-
Hi, I found no information about this in the documentation. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to achive this using pinia and vueuse, following this tutorial: I restore the state in the setup function in App.vue using I also subscribe to the following events to save the editor state (
This seems to be working so far, and I couldn't find a better way to do it. Anyway, this might help others who would like to have this feature. IMHO this would be a nice feature integrated into the baklava editor. Or at least it would be nice to have one event (r.g. editorContentsChanged) to handle all these changes and call the save function in one place). |
Beta Was this translation helpful? Give feedback.
I was able to achive this using pinia and vueuse, following this tutorial:
https://www.vuemastery.com/blog/refresh-proof-your-pinia-stores/
I restore the state in the setup function in App.vue using
editor.load(JSON.parse(store.getEditorState))
.I also subscribe to the following events to save the editor state (
store.save(JSON.stringify(editor.save()));
):This seems to be working so far, and I couldn't find a better way to do it. Anyway, this might help others who would like to have this feature.
IMHO this would be a nice feature integrated into the baklava editor. Or at least it would be …