ui: fix vditor getValue

This commit is contained in:
undefined committed 2022-01-20 22:21:56 +08:00
1 parent dad34de9c7
commit a70c55e585
2 files changed
+11 -11

No files matched your search

@@ -191,8 +191,8 @@ export default class Editor extends DOMAttachedObject {
*/
value(val) {
this.ensureValid();
if (typeof val === 'string') return this.editor.setValue(val);
return this.editor.getValue();
if (typeof val === 'string') return (this.editor || this.vditor).setValue(val);
return (this.editor || this.vditor).getValue();
}
focus() {