Преглед изворни кода

RICHER_CARD_COMMENT_EDITOR=true has no effect (no rich text toolbar shown) fixed!

seve12 пре 2 месеци
родитељ
комит
836226a8d3
1 измењених фајлова са 5 додато и 7 уклоњено
  1. 5 7
      client/components/main/editor.js

+ 5 - 7
client/components/main/editor.js

@@ -79,7 +79,6 @@ BlazeComponent.extendComponent({
       autosize($textarea);
       $textarea.escapeableTextComplete(mentions);
     };
-/*
     if (Meteor.settings.public.RICHER_CARD_COMMENT_EDITOR === true || Meteor.settings.public.RICHER_CARD_COMMENT_EDITOR === 'true') {
       const isSmall = Utils.isMiniScreen();
       const toolbar = isSmall
@@ -117,8 +116,8 @@ BlazeComponent.extendComponent({
         ].join('|');
         const badPatterns = new RegExp(
           `(?:${[
-            `<(${badTags})s*[^>][\\s\\S]*?<\\/\\1>`,
-            `<(${badTags})[^>]*?\\/>`,
+            `<(${badTags})\s*[^>][\s\S]*?<\/\1>`,
+            `<(${badTags})[^>]*?\/>`,
           ].join('|')})`,
           'gi',
         );
@@ -128,9 +127,9 @@ BlazeComponent.extendComponent({
         // remove attributes ' style="..."'
         const badAttributes = new RegExp(
           `(?:${[
-            'on\\S+=([\'"]?).*?\\1',
-            'href=([\'"]?)javascript:.*?\\2',
-            'style=([\'"]?).*?\\3',
+            'on\\S+=([\'\"]?).*?\\1',
+            'href=([\'\"]?)javascript:.*?\\2',
+            'style=([\'\"]?).*?\\3',
             'target=\\S+',
           ].join('|')})`,
           'gi',
@@ -300,7 +299,6 @@ BlazeComponent.extendComponent({
     } else {
       enableTextarea();
     }
-*/
     enableTextarea();
   },
   events() {