Преглед изворни кода

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

Ryu Sato пре 8 година
родитељ
комит
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 { BasicInterceptor } from 'crowi-pluginkit';
 
 
+import * as codemirror from 'codemirror';
+
 import markdownTable from 'markdown-table';
 import markdownTable from 'markdown-table';
 
 
 /**
 /**
@@ -65,6 +67,7 @@ export default class ReformMarkdownTableInterceptor extends BasicInterceptor {
 
 
       // replace the lines to strFormatedTableLines
       // replace the lines to strFormatedTableLines
       editor.getDoc().replaceRange(strTableLinesFormated, this.getBot(editor), editor.getCursor());
       editor.getDoc().replaceRange(strTableLinesFormated, this.getBot(editor), editor.getCursor());
+      codemirror.commands.newlineAndIndent(editor);
 
 
       // report to manager that handling was done
       // report to manager that handling was done
       context.handlers.push(this.className);
       context.handlers.push(this.className);