Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 2814, 2815 #2816

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/modules/scaffold/backboneFormsOverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @simondate, I'm curious as to why we're allowing the tag here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? Do you think we should also expose options here in config/config.json?

I guess that will make this release slightly more future proof? As if in the future more attributes are added we can extend it further there.

Copy link

@StuartNicholls StuartNicholls Feb 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, that was supposed to say, <i> tag, rather than making the rest of the line italicised!

So was just asking why HTML italic tag is there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just in the example that I copied from CKEditior's website. I know that some other icon packs such as Font Awesome use <i>, so perhaps someone else may find it useful.

disallow: convertStringsToRegExDeep((Origin.constants.ckEditorHtmlSupport && Origin.constants.ckEditorHtmlSupport.disallow) || [])
},
on: {
Expand Down
5 changes: 4 additions & 1 deletion lib/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions routes/index/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
List,
ListProperties,
Paragraph,
RemoveFormat,
SelectAll,
ShowBlocks,
SourceEditing,
Expand Down Expand Up @@ -126,6 +127,7 @@
List,
ListProperties,
Paragraph,
RemoveFormat,
SelectAll,
ShowBlocks,
SourceEditing,
Expand Down