Skip to content

Character counter takes into account the HTML tags when rich text editor is enabled #9821

@paulinebessoles

Description

@paulinebessoles

Describe the bug
As a user, when creating a proposal with the HTML editor enabled, I see the character counter decremented in a weird way.

To Reproduce

  1. Go to a proposal creation form when rich text editor is enabled for participants
  2. Start filling the description field
  3. Add some html tags (bold, italic, list etc.)
  4. See error on the counter

Expected behavior
As a user, when I am limited by the number of characters for my proposal/initiative or other content, I expect the limit to only count inputted characters.

Screenshots
There should be 15000 characters left:
Capture d’écran 2022-09-15 à 11 18 31

Capture d’écran 2022-09-15 à 11 18 42

The counter takes into account all this HTML: <strong>My name is Pauline</strong>

Extra data (please complete the following information):

  • Decidim Version: [0.26, 0.27]

Additional context
Add any other context about the problem here. For instance, add Metadecidim link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions