Skip to content

Why do we need a second editor instance #90

Answered by umaranis
iamleson98 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @iamleson98 ,

Both are excellent questions.

  1. Lexical supports nested editors. So you can have a child editor inside the main editor. For instance, the image label is a nested editor and it can have its own separate configuration. editor references the main editor while activeEditor references the active editor that could be the main editor or an editor nested inside it.
  2. To support multiple editors on the same page, we need to put editor references into the context so that child components are able to pick up the correct parent.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by umaranis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants