Open giacomoran opened 1 year ago
Hello, I'm facing the same issue, it looks like there's a special logic to revert state instead of actually perform a trim. And that's definitely not what you expect when calling this method, I'd like my text to trim instead of just not being pasted.
Are there any plans to fix this? Pasted text should trimmed to max length instead of doing nothing.
Lexical version: 0.7.6
Steps To Reproduce
MaxLengthPlugin
in Lexical Playground)At step 3. the pasted text is truncated at the maximum length. At step 5. no text is pasted.
trimTextContentFromAnchor
reverts to the previous editor state.My intuition is that the behavior at step 3. is correct.