TinyMCE customization#
This chapter is a developer reference manual for customizing TinyMCE.
Remove imported formats#
Similar to adding formats, you can remove formats in a couple of ways.
Add-on GenericSetup configuration file#
Alternatively, you can use GenericSetup in your add-on.
<record field="content_css"
interface="plone.base.interfaces.controlpanel.ITinyMCESchema"
name="plone.content_css"
>
<value purge="true">
<element>++theme++barceloneta/tinymce/tinymce-ui-content.css</element>
</value>
</record>
Configure the TinyMCE control panel#
Plone 6 Classic UI ships with the Barceloneta theme which includes two custom formats, highlight-inline
and p.highlight-paragraph
, in the TinyMCE menu.
You can remove these formats through the TinyMCE control panel.
Navigate to
, or append@@tinymce-controlpanel
to the root of your website in your browser's location bar.Scroll down to Choose the CSS used in WYSIWYG Editor Area.
Remove the entry
++theme++barceloneta/tinymce/tinymce-formats.css
.Click the Save button.
Once removed, the custom formats will no longer appear in the menu.
Configure <iframe>
sandboxing#
Since version 7.0, TinyMCE adds the attribute sandbox=""
to make the <iframe>
elements sandboxed with all restrictions.
To customize this behavior, there are two options which you can add to the Other settings JSON configuration in the Advanced tab of the TinyMCE control panel.
If you want to deactivate sandboxing in general, use the following JSON configuration.
{
"sandbox_iframes": false
}
You can also exclude certain URLs from being sandboxed as follows.
{
"sandbox_iframes_exclusions": [
"my.url.com"
]
}
See also
See sandbox_iframes_exclusions
for TinyMCE's default settings.