Explorar o código

enable existed link

yusuketk %!s(int64=5) %!d(string=hai) anos
pai
achega
12e50bf2bd

+ 1 - 1
src/client/js/components/PageEditor/CodeMirrorEditor.jsx

@@ -654,7 +654,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
   }
 
   showLinkEditHandler() {
-    this.linkEditModal.current.show(mlu.getSelectedTextInEditor(this.getCodeMirror()));
+    this.linkEditModal.current.show(mlu.getMarkdownLink(this.getCodeMirror()));
   }
 
   showHandsonTableHandler() {

+ 8 - 0
src/client/js/components/PageEditor/MarkdownLinkUtil.js

@@ -3,6 +3,14 @@
  */
 class MarkdownLinkUtil {
 
+  getMarkdownLink(editor) {
+    const isInLink = true;
+    if (isInLink) {
+      return; // with param
+    }
+    return editor.getDoc().getSelection();
+  }
+
   getSelectedTextInEditor(editor) {
     return editor.getDoc().getSelection();
   }