You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Clear Format button on my toolbar, to run this command: editor.chain().focus().clearNodes().unsetAllMarks().run()
It works always fine, but when user has all content on editor selected (ctrl/cmd + A).
If all content is selected and we run clearNodes() or unsetAllMarks(), the command runs and selection is cleared, so the next command can NOT be applied.
On the following video, the last 4 buttons have the following commands:
What’s the bug you are facing?
I have a Clear Format button on my toolbar, to run this command:
editor.chain().focus().clearNodes().unsetAllMarks().run()
It works always fine, but when user has all content on editor selected (ctrl/cmd + A).
If all content is selected and we run
clearNodes()
orunsetAllMarks()
, the command runs and selection is cleared, so the next command can NOT be applied.On the following video, the last 4 buttons have the following commands:
Screen.Recording.2022-02-06.at.13.58.15.mov
Notice the issues when all content is selected, and also notice how everything works as expected when selecting all content BUT the last character.
How can we reproduce the bug on our side?
On https://tiptap.dev/examples/default you can select all content and click
clear marks
orclear nodes
to confirm current selection gets lost.Can you provide a CodeSandbox?
No response
What did you expect to happen?
I expect both commands get applied on current selection, and selection to be kept after transform.
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: