Skip to content

Commit 69ff0be

Browse files
authored
Merge pull request plone#1544 from plone/6-dev--tinymce-upgrade
TinyMCE upgrade to Plone 6, Pt. 1, against 6.0 branch
2 parents 100555c + 6777a84 commit 69ff0be

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

docs/backend/upgrading/version-specific-migration/upgrade-to-60.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,3 +546,59 @@ In that case, you are advised to add the `image_scales` column manually to the c
546546
```{seealso}
547547
[plone/plone.app.upgrade PR 292](https://github.com/plone/plone.app.upgrade/pull/292)
548548
```
549+
550+
551+
(v60-tinymce-label)=
552+
553+
## New version of TinyMCE
554+
555+
Plone 6 ships with a new version of TinyMCE.
556+
While Plone 5.2 ships with TinyMCE 4.7, Plone 6.0 ships with TinyMCE 5.10.
557+
The TinyMCE integration `pat-tinymce` has also changed, but the configuration options have been almost kept the same and are likely to be compatible with your existing installation.
558+
The configuration changes are:
559+
560+
- Added configuration options `text.enableImageZoom`, `defaultSrcset`, `imageCaptioningEnabled`, and `tiny.language`.
561+
- Removed configuration option `imageScales`.
562+
- Option values changed for `imageClasses`.
563+
564+
565+
### TinyMCE templates
566+
567+
In Plone 6, the TinyMCE template plugin is built-in and can be enabled via a checkbox.
568+
Whereas in Plone 5, you had to enable the template plugin as an external plugin via the `custom_plugins` configuration option.
569+
The template registration is the same as before, but in Plone 6 your templates need to have a `description`.
570+
Otherwise TinyMCE will throw a JavaScript error, and the templates won't be usable at all.
571+
572+
The following example {file}`registry.xml` may be used for configuring TinyMCE with some templates.
573+
574+
```xml
575+
<records interface="Products.CMFPlone.interfaces.controlpanel.ITinyMCESchema"
576+
prefix="plone">
577+
<value key="plugins" purge="False">
578+
<element>template</element>
579+
</value>
580+
<value key="custom_plugins" purge="True">
581+
<!-- Remove the old TinyMCE template plugin -->
582+
</value>
583+
<value key="templates">
584+
[
585+
{
586+
"title": "Template 1",
587+
"description": "This is an example template",
588+
"url": "++plone++my.site/template1.html"
589+
},
590+
{
591+
"title": "Template 2",
592+
"description": "This is another example template",
593+
"url": "++plone++my.site/template2.html"
594+
}
595+
]
596+
</value>
597+
</records>
598+
```
599+
600+
Please make sure you write valid JSON for the `template` option.
601+
602+
```{seealso}
603+
See also the [TinyMCE 4 to 5 upgrade guide](https://www.tiny.cloud/docs/migration-from-4x/).
604+
```

0 commit comments

Comments
 (0)