Split content by paragraphs and create one editor per each new paragraph #5324
-
Hello everyone, I have content in my source text tiptap editor, all seems amazing, no complains. Now, how can I split my content in paragraphs and create a new tip tap editor for each paragraph? source Text : tiptap editor [paragraph 1, paragraph 2, paragraph 3] => tiptap editor 1 [paragraph 1] I would like to do that using the prosemirror object model instead to split and deal with html content from the source tiptap editor. Seems as the following documentation can help but I don't know how to start... maybe in someway, using the prosemirror object model,... https://tiptap.dev/docs/editor/core-concepts/prosemirror Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
A good first question would be, why? The editor is obviously meant to be the single editor for content so it seems like you may be misusing it. As for how to do it. If you look at the json representation of the editor content you will see the outermost element (doc) and sub elements (paragraph) which you could easily split out into their own doc copies and make more editor instances with. |
Beta Was this translation helpful? Give feedback.
A good first question would be, why?
The editor is obviously meant to be the single editor for content so it seems like you may be misusing it.
As for how to do it. If you look at the json representation of the editor content you will see the outermost element (doc) and sub elements (paragraph) which you could easily split out into their own doc copies and make more editor instances with.