Skip to content

[Bug]: Character Count extension does not count characters correctly when there is mention #5777

@ederssouza-hotmart

Description

@ederssouza-hotmart

Affected Packages

extension-character-count and extension-mention and suggestion

Version(s)

2.9.1

Bug Description

When using the editor with the extensions @tiptap/extension-mention, @tiptap/suggestion and @tiptap/extension-character-count the character count does not consider the length of the mention, only the @. The error can be reproduced in the mention extension doc itself https://tiptap.dev/docs/examples/advanced/mentions.

image

Browser Used

Chrome

Code Example URL

https://tiptap.dev/docs/examples/advanced/mentions

Expected Behavior

The character count should be 56 not 44.

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Open SourceThe issue or pull reuqest is related to the open source packages of Tiptap.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions