2
0
Эх сурвалжийг харах

fix: insert file for visual editor

NGPixel 5 жил өмнө
parent
commit
d6f2176de2

+ 2 - 3
client/components/editor/editor-ckeditor.vue

@@ -69,7 +69,6 @@ export default {
     }, 300))
     }, 300))
 
 
     this.$root.$on('editorInsert', opts => {
     this.$root.$on('editorInsert', opts => {
-      console.info(opts)
       switch (opts.kind) {
       switch (opts.kind) {
         case 'IMAGE':
         case 'IMAGE':
           this.editor.execute('imageInsert', {
           this.editor.execute('imageInsert', {
@@ -77,8 +76,8 @@ export default {
           })
           })
           break
           break
         case 'BINARY':
         case 'BINARY':
-          this.insertAtCursor({
-            content: `[${opts.text}](${opts.path})`
+          this.editor.execute('link', opts.path, {
+            linkIsDownloadable: true
           })
           })
           break
           break
       }
       }