From bcb1b232bcfae5e06a651d1ce7e34f670b1a334c Mon Sep 17 00:00:00 2001 From: Saraph1nes Date: Wed, 11 Sep 2024 16:36:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Editor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Editor.js b/src/Editor.js index 2babecb15..63aae2b8d 100644 --- a/src/Editor.js +++ b/src/Editor.js @@ -725,4 +725,11 @@ export default class Editor { this.options.writingStyle = writingStyle; this.initWritingStyle(); } + + /** + * 设置编辑器值 + */ + setValue(value = '') { + this.editor.setOption('value', value); + } }