Set valid elements in tinyMce from Plone5

Hi, i need to add some valid elements in tinyMCE (script, style, embed for example).

Where is the configuration of those settings in Plone5?

Just for clarity, this page @@filter-controlpanel is not what i'm looking for, since the tags are removed client side.

Not looked into valid tags on Plone 5 (yet), but Plone 4 TinyMCE configuration was also looking into filter settings: it was dynamically adding valid tags reading from the Plone filter configuration.

Are you sure it's not working? Can you inspect to see if the TinyMCE extended_valid_elements (or simply valid_elements?) is provided in the JSON configuration?

Actually all the filters are disabled in @@filter-controlpanel (just for being sure of who was stripping tags).

No formats are provided in @@tinymce-controlpanel, but i think in that field you cannot set tinymce properties.. or not?

No, I never seen this into the specific TinyMCE settings panel.

I don't know if this feature has been lost or not, I need to check (any other idea here?)

remember to clear

remember to clear the cache, read Troubleshooting safe-html here:
https://plone.org/products/plone-true-gallery

It does't seem a thread cache issue. I tested changes after a Plone 5 but new tags are kept only with TinyMCE/JavaScript disabled.

I checked the Plone 5 source but I don't find a point where safe_html contiguration is read anymore. I fear this feature has been lost in the mockup migration.

Anyone can confirm this?

Safe html is not read by tinymce anymore.

It was one of the most buggy and cumbersome features that was attempted to be implemented in the previous tinymce implementation and no one worked on re-introducing it. IMO, it's better to just let the safe transform clean the markup on the way out than tinymce screwing up your markup all the time because of the configuration.

But so there is a way to change the tinyMCE base configuration? I checked also the source files but i didn't find a way...

@vangheem but how fix the issue reported by @alessio? TinyMCE is still cleaning the code client side, so there is no way now to introduce additional tag, isn't it?

hmmm, that should not be happening I thought.

Configuration for tinymce is done here: https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/patterns/init.py

You can check the configuration on the data attributes of the raw html output.

What you can do is go to the tinymce configuration in site setup -> Advanced and provide a json config of configuration you'd like to override for tinymce.

It works, Thank you! Anyway it would be better if we could change those settings from the control panel :smile: