Skip to content

RichTextarea widget issues & questions regarding integration #182

@kashyl

Description

@kashyl

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions