From 2c7cbcf250ec95845fc9a94d4cbbd4cd2a5e2911 Mon Sep 17 00:00:00 2001 From: Simon Date Date: Wed, 12 Feb 2025 12:26:28 +0000 Subject: [PATCH 1/5] Fixes #2814 --- frontend/src/modules/scaffold/backboneFormsOverrides.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/modules/scaffold/backboneFormsOverrides.js b/frontend/src/modules/scaffold/backboneFormsOverrides.js index 2485ea109..d3c280704 100644 --- a/frontend/src/modules/scaffold/backboneFormsOverrides.js +++ b/frontend/src/modules/scaffold/backboneFormsOverrides.js @@ -107,6 +107,7 @@ define([ htmlSupport: { // Convert all allow/disallow strings to regexp, as config is json only allow: convertStringsToRegExDeep((Origin.constants.ckEditorHtmlSupport && Origin.constants.ckEditorHtmlSupport.allow) || []), + allowEmpty: ['span', 'i'], disallow: convertStringsToRegExDeep((Origin.constants.ckEditorHtmlSupport && Origin.constants.ckEditorHtmlSupport.disallow) || []) }, on: { From d4c548035d5f5d7e666cbe9ccc0ff03b19cb28c8 Mon Sep 17 00:00:00 2001 From: Simon Date Date: Wed, 12 Feb 2025 12:26:38 +0000 Subject: [PATCH 2/5] Fixes #2815 --- routes/index/index.hbs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/index/index.hbs b/routes/index/index.hbs index ec9764b98..1c95157c0 100644 --- a/routes/index/index.hbs +++ b/routes/index/index.hbs @@ -80,6 +80,7 @@ List, ListProperties, Paragraph, + RemoveFormat, SelectAll, ShowBlocks, SourceEditing, @@ -126,6 +127,7 @@ List, ListProperties, Paragraph, + RemoveFormat, SelectAll, ShowBlocks, SourceEditing, From a8e607a99ec2c16da75caec66ba01ca93c41b72d Mon Sep 17 00:00:00 2001 From: Simon Date Date: Wed, 12 Feb 2025 16:18:58 +0000 Subject: [PATCH 3/5] Allows attributes, classes and styles --- lib/configuration.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/configuration.js b/lib/configuration.js index 03f039d3d..a006e42aa 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -83,7 +83,10 @@ function Configuration() { maxLoginAttempts: 3, ckEditorHtmlSupport: { allow: [{ - name: "^(blockquote|ul|ol|span)$" + name: "^(blockquote|ul|ol|span)$", + "attributes": true, + "classes": true, + "styles": true },{ name: ".*", classes: true, From 1deb05ed80ef5e16edbe7a567969a56d08373e6d Mon Sep 17 00:00:00 2001 From: Simon Date Date: Mon, 17 Feb 2025 18:46:53 +0000 Subject: [PATCH 4/5] Changed allowEmpty to be imported via config --- frontend/src/modules/scaffold/backboneFormsOverrides.js | 2 +- lib/configuration.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/modules/scaffold/backboneFormsOverrides.js b/frontend/src/modules/scaffold/backboneFormsOverrides.js index d3c280704..9d005330c 100644 --- a/frontend/src/modules/scaffold/backboneFormsOverrides.js +++ b/frontend/src/modules/scaffold/backboneFormsOverrides.js @@ -107,7 +107,7 @@ define([ htmlSupport: { // Convert all allow/disallow strings to regexp, as config is json only allow: convertStringsToRegExDeep((Origin.constants.ckEditorHtmlSupport && Origin.constants.ckEditorHtmlSupport.allow) || []), - allowEmpty: ['span', 'i'], + allowEmpty: convertStringsToRegExDeep((Origin.constants.ckEditorHtmlSupport && Origin.constants.ckEditorHtmlSupport.allowEmpty) || []), disallow: convertStringsToRegExDeep((Origin.constants.ckEditorHtmlSupport && Origin.constants.ckEditorHtmlSupport.disallow) || []) }, on: { diff --git a/lib/configuration.js b/lib/configuration.js index a006e42aa..aefbe82d2 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -96,7 +96,11 @@ function Configuration() { attributes: { target: true } - }] + }], + allowEmpty: [ + "span", + "i" + ] }, maxFileUploadSize: '200MB', ckEditorEnterMode: 'ENTER_P' From 0b54fbec498a494c22362ed6bb3d5a5e51b33410 Mon Sep 17 00:00:00 2001 From: Simon Date Date: Thu, 20 Feb 2025 14:36:33 +0000 Subject: [PATCH 5/5] Added attributes for tags Further part of #2814 --- lib/configuration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/configuration.js b/lib/configuration.js index aefbe82d2..ce63c7fc7 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -83,7 +83,7 @@ function Configuration() { maxLoginAttempts: 3, ckEditorHtmlSupport: { allow: [{ - name: "^(blockquote|ul|ol|span)$", + name: "^(a|blockquote|ul|ol|span)$", "attributes": true, "classes": true, "styles": true