How to synchronize edits between two editor instances? #5829
-
So my use case is that I allow talking with multiple AI agents at once. (screenshot https://glama.ai/ UI) I am trying to find a way how I could synchronize user input across multiple editor instances. |
Beta Was this translation helpful? Give feedback.
Answered by
nperez0111
Nov 13, 2024
Replies: 1 comment
-
Listen for the on update event and then take editor.getJSON() and set the other editor instances with editor.chain().setContent(json).run(). This would synchronize the states between the instances. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nperez0111
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Listen for the on update event and then take editor.getJSON() and set the other editor instances with editor.chain().setContent(json).run(). This would synchronize the states between the instances.