Replies: 1 comment 1 reply
-
|
You can have multiple editors on the same page, the use case for this on the playground is the comment plugin, where the comment entry is a different editor than the main document one, so you want to toggle the active editor with its plugins, etc. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am building my own editor using some stuff from the playground and I see usages of
activeEditor, which is set like thisIt's been used for commands like
activeEditor.dispatchCommand(UNDO_COMMAND, undefined);I tried using
editorfromconst [editor] = useLexicalComposerContext();and it works the same, so I'm wondering why would I useactiveEditor? Would I stumble upon some issues in the future if I keep using theeditorfrom the context?Beta Was this translation helpful? Give feedback.
All reactions