Skip to content

Commit 1d8d435

Browse files
committed
TinyMCE upgrade to Plone 6, Pt. 1.
1 parent 8c1e15c commit 1d8d435

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

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

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,3 +546,66 @@ 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 Mockup for 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`, `tiny.language`,
561+
- Removed configuration options: `imageScales`,
562+
- Option values changes for: `imageClasses`,
563+
564+
But there is more.
565+
566+
567+
### TinyMCE templates
568+
569+
While in Plone 5 you had to enable the template plugin (which was already shipped but not exposed to the UI) via the `custom_plugins` configuration option, Plone 6 has this option built-in.
570+
But in Plone 6 your templates need to have a `description`, otherwise TinyMCE will throw an JavaScript error and the templates won't be usable at all.
571+
572+
This is an example `registry.xml` snippet 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+
603+
### Custom Plugins
604+
605+
TODO
606+
607+
608+
### More information on TinyMCE 4 to 5 migration
609+
610+
For more information on the TinyMCE 4 to 5 upgrade consult the TinyMCE upgrade guide: https://www.tiny.cloud/docs/migration-from-4x/
611+

0 commit comments

Comments
 (0)