Skip to content

Commit

Permalink
map renamed menu and toolbar plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki committed Oct 20, 2023
1 parent 8d4ece4 commit eac9e4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pat/tinymce/tinymce--implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,17 @@ export default class TinyMCE {
return url;
}

// BBB: TinyMCE 6 has renamed toolbar and menuitem plugins.
// map them here until they are updated in Plone's configuration:
// menu: "formats" -> "styles"
if(tinyOptions?.menu?.format) {
tinyOptions.menu.format.items = tinyOptions.menu.format.items.replace('formats', 'styles');
}
// toolbar: "styleselect" -> "styles"
if(tinyOptions?.toolbar) {
tinyOptions.toolbar = tinyOptions.toolbar.replace('styleselect', 'styles');
}

tinymce.init(tinyOptions);
self.tiny = tinymce.get(self.tinyId);

Expand Down

0 comments on commit eac9e4b

Please sign in to comment.