diff --git a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue index ab4f5b5f1..76939bbb7 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue @@ -139,8 +139,17 @@ export default { value(newValue = '') { if (newValue !== this.lastValue) { const { tr } = this.state; - tr.insertText(newValue, 0, tr.doc.content.size); - this.state = this.view.state.apply(tr); + if (this.isFormatMode) { + this.state = createState( + newValue, + this.placeholder, + this.plugins, + this.isFormatMode + ); + } else { + tr.insertText(newValue, 0, tr.doc.content.size); + this.state = this.view.state.apply(tr); + } this.view.updateState(this.state); } },