diff --git a/src/tools/html-wysiwyg-editor/editor/editor.vue b/src/tools/html-wysiwyg-editor/editor/editor.vue index bbe1799e..b4a9d0d7 100644 --- a/src/tools/html-wysiwyg-editor/editor/editor.vue +++ b/src/tools/html-wysiwyg-editor/editor/editor.vue @@ -33,6 +33,12 @@ const editor = new Editor({ ], }); +watch(html, (newHtml) => { + if (editor.getHTML() !== newHtml) { + editor.commands.setContent(newHtml); + } +}); + editor.on('update', ({ editor }) => emit('update:html', editor.getHTML())); tryOnBeforeUnmount(() => { diff --git a/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue b/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue index 06e266cd..998dceef 100644 --- a/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue +++ b/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue @@ -24,6 +24,18 @@ const formattedHtml = computed(() => {