Răsfoiți Sursa

Fixed Line break which is wrongly added in Cards description and Cards comments.
Added Code View `</>` button when RICHER_CARD_COMMENT_EDITOR=true and in desktop view
(=non-mobile, so there is enough screen space for buttons in desktop view).

Thanks to Emile840 and xet7 !

Fixes #3885

Lauri Ojansivu 4 ani în urmă
părinte
comite
ec01e5182d
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      client/components/main/editor.js

+ 2 - 2
client/components/main/editor.js

@@ -50,7 +50,7 @@ Template.editor.onRendered(() => {
           ['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', 'codeview', 'help']],
         ];
         ];
     const cleanPastedHTML = function(input) {
     const cleanPastedHTML = function(input) {
       const badTags = [
       const badTags = [
@@ -229,7 +229,7 @@ Template.editor.onRendered(() => {
                 // (and multiplies by pasting more) by changing paste "p" to "br".
                 // (and multiplies by pasting more) by changing paste "p" to "br".
                 // Fixes https://github.com/wekan/wekan/2890 .
                 // Fixes https://github.com/wekan/wekan/2890 .
                 // == Fix Start ==
                 // == Fix Start ==
-                //someNote.execCommand('defaultParagraphSeparator', false, 'br');
+                someNote.execCommand('defaultParagraphSeparator', false, 'br');
                 // == Fix End ==
                 // == Fix End ==
                 const original = someNote.summernote('code');
                 const original = someNote.summernote('code');
                 const cleaned = cleanPastedHTML(original); //this is where to call whatever clean function you want. I have mine in a different file, called CleanPastedHTML.
                 const cleaned = cleanPastedHTML(original); //this is where to call whatever clean function you want. I have mine in a different file, called CleanPastedHTML.