瀏覽代碼

- Add new button to insert a URL link
- Add new popover allowing you to edit URL links
- enable spell check and grammerly extension

ryanMushy 4 年之前
父節點
當前提交
96c6fa0276
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      client/components/main/editor.js

+ 6 - 1
client/components/main/editor.js

@@ -49,7 +49,7 @@ Template.editor.onRendered(() => {
           ['para', ['ul', 'ol', 'paragraph']],
           ['para', ['ul', 'ol', 'paragraph']],
           ['table', ['table']],
           ['table', ['table']],
           //['insert', ['link', 'picture', 'video']], // iframe tag will be sanitized TODO if iframe[class=note-video-clip] can be added into safe list, insert video can be enabled
           //['insert', ['link', 'picture', 'video']], // iframe tag will be sanitized TODO if iframe[class=note-video-clip] can be added into safe list, insert video can be enabled
-          //['insert', ['link', 'picture']], // modal popup has issue somehow :(
+          ['insert', ['link']],//, 'picture']], // modal popup has issue somehow :(
           ['view', ['fullscreen', 'help']],
           ['view', ['fullscreen', 'help']],
         ];
         ];
     const cleanPastedHTML = function(input) {
     const cleanPastedHTML = function(input) {
@@ -234,6 +234,8 @@ Template.editor.onRendered(() => {
             },
             },
           },
           },
           dialogsInBody: true,
           dialogsInBody: true,
+          spellCheck: true,
+          disableGrammar: false,
           disableDragAndDrop: true,
           disableDragAndDrop: true,
           toolbar,
           toolbar,
           popover: {
           popover: {
@@ -245,6 +247,9 @@ Template.editor.onRendered(() => {
               ['float', ['floatLeft', 'floatRight', 'floatNone']],
               ['float', ['floatLeft', 'floatRight', 'floatNone']],
               ['remove', ['removeMedia']],
               ['remove', ['removeMedia']],
             ],
             ],
+            link: [
+              ['link', ['linkDialogShow', 'unlink']]
+            ],
             table: [
             table: [
               ['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],
               ['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],
               ['delete', ['deleteRow', 'deleteCol', 'deleteTable']],
               ['delete', ['deleteRow', 'deleteCol', 'deleteTable']],