fix(editor): Fix value syncing in SQL and HTML editor (#6848)

This commit is contained in:
Milorad FIlipović 2023-08-04 10:50:47 +02:00 committed by GitHub
parent a5667e6c42
commit 90e825f743
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -111,7 +111,8 @@ export default defineComponent({
this.getHighlighter()?.removeColor(this.editor, this.htmlSegments);
this.getHighlighter()?.addColor(this.editor, this.resolvableSegments);
this.$emit('update:modelValue', this.doc);
// eslint-disable-next-line @typescript-eslint/no-base-to-string
this.$emit('update:modelValue', this.editor?.state.doc.toString());
}),
];
},

View file

@ -174,7 +174,7 @@ export default defineComponent({
highlighter.removeColor(this.editor as EditorView, this.plaintextSegments);
highlighter.addColor(this.editor as EditorView, this.resolvableSegments);
this.$emit('update:modelValue', this.doc);
this.$emit('update:modelValue', this.editor?.state.doc.toString());
}),
);
}