sibiraj-s / svelte-tiptap

Svelte components for tiptap v2
https://sibiraj-s.github.io/svelte-tiptap/
MIT License
244 stars 21 forks source link

how to dynamically update the editor content ? #13

Closed aneuraz closed 1 year ago

aneuraz commented 1 year ago

Hi, This is more a question than an issue but I would like to update the content on the editor on the fly, while the user is typing by sending the editorContent to an external process and getting back enriched text (with formatting and metadata).

For example: original content:

[{
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "Example Text"
        }
      ]
    }]

content to reinject:

[{
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "Example"
        },
        {
          "type": "strong",
          "text": "Text"
        },
      ]
    }]