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

ENH Remove duplicated default settings from cms TinyMCE config #1725

Merged

Conversation

GuySartorelli
Copy link
Member

Description

Requires silverstripe/silverstripe-framework#11201
Removes the duplication of default settings for the cms TinyMCE config instance. This does two things:

  1. Removes duplication, so if we make a change we only have to change it once
  2. Ensures changes to the defaults will apply to the cms config, which is appropriate.

Note that this config has some extended_valid_elements defined - I've opted to not include that in the default set, because these elements aren't things you're likely to want in most of your WSIWYG fields. In a future major release we'll probably be removing these from the cms config as well.

Issues

Comment on lines -43 to 30
'extended_valid_elements' => "img[class|src|alt|title|hspace|vspace|width|height|align|name"
. "|usemap|data*],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],"
'extended_valid_elements' => "iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],"
. "object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]"
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that the img stuff is included in the default valid_elements set so I removed that from here too.

@@ -24,24 +24,9 @@
'friendly_name' => 'Default CMS',
'priority' => '50',
'skin' => 'silverstripe',
'body_class' => 'typography',
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's in the set of default options already. I removed everything that is in the default options so that changing the default options will update for this as well.

@emteknetnz emteknetnz merged commit d03d790 into silverstripe:2 Apr 18, 2024
12 checks passed
@emteknetnz emteknetnz deleted the pulls/2/remove-default-setting branch April 18, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants