From dc4afcc1c07ad49cb00beaf193e370e3365e6294 Mon Sep 17 00:00:00 2001 From: tianxiumei <1559538054@qq.com> Date: Thu, 23 Mar 2023 11:44:55 +0800 Subject: [PATCH] fix: onChange should not be executed as soon as it comes in --- src/JoditEditor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/JoditEditor.js b/src/JoditEditor.js index e56605c..ee9ac01 100644 --- a/src/JoditEditor.js +++ b/src/JoditEditor.js @@ -42,6 +42,7 @@ const JoditEditor = forwardRef( const element = textArea.current; const jodit = Jodit.make(element, config); + jodit.value=value // set initial value textArea.current = jodit; if (isFunction(editorRef)) {