TinyMCE "save" plugin in Plone 5

Hi! I am now working on the issue issue 1454 about the missing "save" plugin in Plone5. Actually "save" plugin does come with TinyMCE in Plone 5 originally, but in "controlpanel.py" of TinyMCE it is commented and marked as "not implemented".

After deleting the comment, the choice of "save" appears on the plugins config panel. But when you choose it and apply, an exception comes up -- "WrongContainedType: ([ConstraintNotSatisfied('save')], 'value')" , which represents that the value "save" is not in the vocabulary of a schema.List object. This object is of the same class as the one we generate on the config panel(in "controlpanel.py"), but they seem to be not one instance...

And now I don't know how this object is generated, I couldn't find related codes or configure files at all... Anyone knows about this?

1 Like

If the path exists:

/eggs/Products.CMFPlone-5.x.x-py2.7.egg/Products/CMFPlone/static/components/tinymce-builded/js/tinymce/plugins/save/plugin.js

It seems to me that the best way to add this plugin is as a custom plugin and using the same plugin.js file and adding the script as part of a theme, this is managed with the url:

@@tinymce-controlpanel#autotoc-item-autotoc-1

for example:

save |++theme++default/tinymce/plugins/save/plugin.js

This will add and compile the file plone-logged-in-compiled.js with the custom plugin and it will load automatically when the TinyMCE editor is opened.