Handle Selection across DecoratorNodes using LexicalNestedComposer #2938
Unanswered
matthewmullin01
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I realize this is not as simple as it seems as DecoratorNodes can contain anything so selection behaviour may not always be predictable. It is difficult to know whether the intention is to select text or select the entire node. That being said, is there a common approach to handling text selection across DecoratorNodes?
Here is an example using the playground image plugin:
Screen.Recording.2022-09-02.at.5.08.37.PM.mov
Notice how the cursor/selection jumps between the outer editor and the inner editor (caption).
TipTap provide a NodeViewContent element that can be embedded inside custom plugins. It handles the editor state, text selection and cursor placement between the custom plugin and wrapper editor.
Is there a recommended approach to handle text selection across DecoratorNodes?
Beta Was this translation helpful? Give feedback.
All reactions