Browse Source

add a function to get a table string

utsushiiro 7 years ago
parent
commit
dc54982708
1 changed files with 7 additions and 0 deletions
  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 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
    *   ref. https://github.com/wooorm/markdown-table