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

modified the bug that the enter is not inserted after reformed markdown table.

Ryu Sato 8 лет назад
Родитель
Сommit
6098a9e86f
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      resource/js/util/interceptor/ReformMarkdownTableInterceptor.js

+ 3 - 0
resource/js/util/interceptor/ReformMarkdownTableInterceptor.js

@@ -1,5 +1,7 @@
 import { BasicInterceptor } from 'crowi-pluginkit';
 
+import * as codemirror from 'codemirror';
+
 import markdownTable from 'markdown-table';
 
 /**
@@ -65,6 +67,7 @@ export default class ReformMarkdownTableInterceptor extends BasicInterceptor {
 
       // replace the lines to strFormatedTableLines
       editor.getDoc().replaceRange(strTableLinesFormated, this.getBot(editor), editor.getCursor());
+      codemirror.commands.newlineAndIndent(editor);
 
       // report to manager that handling was done
       context.handlers.push(this.className);