Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichTextarea widget issues & questions regarding integration #182

Open
kashyl opened this issue Jan 8, 2025 · 0 comments
Open

RichTextarea widget issues & questions regarding integration #182

kashyl opened this issue Jan 8, 2025 · 0 comments

Comments

@kashyl
Copy link
Contributor

kashyl commented Jan 8, 2025

Hi all, I found some potential issues regarding the RichTextarea and RichTextField:

Issue 1:

Menu bar and character counter change position on new-line input triggering scroll
When pressing Enter to create a new line near the bottom of the container, the following issues occur:

  1. The menu bar of the editor moves upward and goes out of view.
  2. The character counter also moves upward in tandem with the menu bar.
  3. This behavior is reproducible in the demo editor at https://django-formset.fly.dev/richtext/#storing-rich-text-as-json.
    Note: Manually scrolling the page does not trigger this issue; it seems specific to newlines added using the Enter key.

Issue 2:

I attempted to add a MinLengthValidator to a RichTextField in my model like so:

description = RichTextField(max_length=5000, validators=[MinLengthValidator(200)])

However, no matter how much content I type, I always receive the error:
Ensure this value has at least 200 characters (it has 2).

This happens even if the field contains substantial content (e.g., a single "a" or a thousand formatted lines). When the field is empty, it appropriately raises the This field is required error.

Issue 3:

When attempting to access an object with a RichTextField in the Django Admin interface, following error is raised: 'DjangoTemplates' object has no attribute 'framework' in formset/richtext/controls.py, line 17: self.template_name.format(framework=renderer.framework)

Question

I was wondering if this there are any known/potential security risks with this widget, as projects like django-ckeditor and django-prose-editor, which provide similar functionality, seem to be either deprecated due to security issues, or unused in production environments, according to the authors.

Lastly, I just wanted to say that despite a few issues here and there I think the overall functionality is great and appreciate the work you've done on this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant