Nested Editor - how children editor trigger parent edtor update? #6832
-
Like the example of the Playground image caption, we treat the child editor as a node within the parent editor, and serialize it together when serializing the parent editor. However, when the user inputs content in the child editor, it does not trigger the contentUpdate event in the parent editor, which means the changes made in the child editor cannot be saved. What’s the best approach for this? I’m currently trying to manually trigger the parent editor's update within the child editor's contentUpdate event, but this requires serializing the parent editor’s key information within the child editor. Is there a better way to handle this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found there is a function getNearestEditorFromDOMNode which can help me got parent Editor from DOM. parent editor
child editor
|
Beta Was this translation helpful? Give feedback.
I found there is a function getNearestEditorFromDOMNode which can help me got parent Editor from DOM.
so I write AutoSavingPlugin for both parent editor and child editor.
parent editor
child editor