Jelajahi Sumber

use insertText instead of setValue

Yuki Takei 3 tahun lalu
induk
melakukan
db454b84c2
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      apps/app/src/components/PageEditor/CodeMirrorEditor.jsx

+ 2 - 2
apps/app/src/components/PageEditor/CodeMirrorEditor.jsx

@@ -848,8 +848,8 @@ class CodeMirrorEditor extends AbstractEditor {
   // }
 
   showTemplateModal() {
-    const onSubmit = templateText => this.setValue(templateText);
-    this.props.onClickTemplateBtn(onSubmit);
+    const onSubmit = templateText => this.insertText(templateText);
+    this.props.onClickTemplateBtn({ onSubmit });
   }
 
   showLinkEditModal() {