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

add a function to get a table string

utsushiiro 7 лет назад
Родитель
Сommit
dc54982708
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      src/client/js/components/PageEditor/MarkdownTableUtil.js

+ 7 - 0
src/client/js/components/PageEditor/MarkdownTableUtil.js

@@ -84,6 +84,13 @@ class MarkdownTableUtil {
     return editor.getDoc().getRange(curPos, this.getEot(editor));
     return editor.getDoc().getRange(curPos, this.getEot(editor));
   }
   }
 
 
+  /**
+   * return strings from BOT(beginning of table) to EOT(end of table)
+   */
+  getStrFromBotToEot(editor) {
+    return editor.getDoc().getRange(this.getBot(editor), this.getEot(editor));
+  }
+
   /**
   /**
    * returns markdown table whose described by 'markdown-table' format
    * returns markdown table whose described by 'markdown-table' format
    *   ref. https://github.com/wooorm/markdown-table
    *   ref. https://github.com/wooorm/markdown-table