-
Hi, I'm quite new to Svelte and frontend framework in general. I was trying to create a basic CMS site with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @raknay , If you are using Here is a similar example that prints editor contents to the console log every time the content changes. |
Beta Was this translation helpful? Give feedback.
Hi @raknay ,
If you are using
RichTextComposer
, you need to get a reference to it usingbind:this={composer}
, then callcomposer.getEditor().getEditorState()
.This is going to return the state in JSON format.
Here is a similar example that prints editor contents to the console log every time the content changes.
https://github.com/umaranis/svelte-lexical/blob/f2b1f63cac29bb16e93186fe128fae2528eab723/demos/playground/src/App.svelte