Просмотр исходного кода

use insertText instead of setValue

Yuki Takei 2 лет назад
Родитель
Сommit
db454b84c2
1 измененных файлов с 2 добавлено и 2 удалено
  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() {