soumaeda 2 years ago
parent
commit
12b0bf6a09
1 changed files with 4 additions and 4 deletions
  1. 4 4
      apps/app/src/components/PageEditor/MarkdownDrawioUtil.js

+ 4 - 4
apps/app/src/components/PageEditor/MarkdownDrawioUtil.js

@@ -20,12 +20,12 @@ class MarkdownDrawioUtil {
     return editor.state.doc;
     return editor.state.doc;
   }
   }
 
 
-  // get first line number(numeber)
+  // get first line number(number)
   firstLineNum() {
   firstLineNum() {
     return 1;
     return 1;
   }
   }
 
 
-  // get last line number(numeber)
+  // get last line number(number)
   lastLineNum(editor) {
   lastLineNum(editor) {
     return this.doc(editor).lines;
     return this.doc(editor).lines;
   }
   }
@@ -151,8 +151,8 @@ class MarkdownDrawioUtil {
       endPos = this.getEod(editor);
       endPos = this.getEod(editor);
     }
     }
     else {
     else {
-      beginPos = this.getCursorLine(editor).from;
-      endPos = this.getCursorLine(editor).to;
+      beginPos = this.curPos(editor);
+      endPos = this.curPos(editor);
     }
     }
 
 
     editor.dispatch({
     editor.dispatch({