tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

[Bug]: CharacterCount extension doesn't allow pasting anything if the size is greater than the limit

Open preetmishra opened this issue 1 year ago • 3 comments

Which packages did you experience the bug in?

extension-character-count

What Tiptap version are you using?

2.0.2

What’s the bug you are facing?

The CharacterCount extension doesn't allow pasting anything if the size is greater than the limit.

What browser are you using?

Chrome

Code example

https://tiptap.dev/api/extensions/character-count#usage

What did you expect to happen?

I understand how technically it is not a bug. However, it would be nicer to allow pasting whatever content that could potentially fit in. Otherwise, from an end user's perspective, it feels like the paste doesn't work in the Editor.

I'm open to contributing as well. Please let me know if you're open to a pull request.

Please let me know if any other information is required.

Anything to add? (optional)

No response

Did you update your dependencies?

  • [X] Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • [ ] Yes, I’m a sponsor. 💖

preetmishra avatar Apr 27 '23 15:04 preetmishra

if it means you just want to count the character, you can set the limit to null ( limit: null )

handhikadj avatar Apr 29 '23 13:04 handhikadj

I do want to set a limit. Here's what I am proposing. Assume I have set a limit for 200 characters and the content that I am trying to paste has 400 characters. Ideally, the first 200 characters from the content should be pasted. Currently, nothing gets pasted at all

preetmishra avatar Apr 29 '23 14:04 preetmishra

Any updates on this?

GabrielHangor avatar Feb 14 '24 07:02 GabrielHangor