TinyMCE formats doesn't work

Hello everyone,

It's just me or most of the formating in TinyMCE is broken?

Alignment, indent, lists, subscript, superscript, strikethrough,...
All those options include styles in the text which is removed on saving.

Changes are visible in the editor, but if you look in the source-code popup, none of then are present, and if click update every change you made is gone.

I've managed to "fix" alignment by adding classes in TinyMCE config, as seen here:

Are we supose to this kind of configuration for every option in the editor? Is that even possible?

The problem is the HTML filtering. TinyMCE now saves thoses things in inline style attributes, which are not allowed by default. Add style to the list of allowed attributes in the HTML Filtering Settings (@@filter-controlpanel) and you are good to go.

I knew something was missing... thanks for the answer!

I wonder why that isn't enable by default... the editor is almost useless without it.

there is also a setting at the bottom, for

Permitted properties: These CSS properties are allowed in style attributes.

There is nothing like that in Plone 5.

I see that I have it in one version of Phone 5, but not in another, not sure which/why yet…

Was that site maybe migrated from an earlier version?

this is the 5.08 version

Both sites (the one with this setting and the one without) were originally developed in 5, but I have no idea about from which (5.) version and to which (5.) version.

I opened an issue about this topic btw.

The filters change was introduced between 5.0.x and 5.1

IMO allowing styles attribute could be too much powerful..i prefer something like getting back with old control panel and allow only "inline-style" attribute and/or use css classes.

Thanks for this info @tmassman! Just ran into this problem and glad I came upon this discussion before too much time spent trying to figure out/fix. While the fix of adding "styles" seems to be a bit controversial, this issue and forum-page should be referenced on the install and/or migration page since this is new behavior in 5.1.

@cekk Would it be a good middle safety ground to name the specific styles wanting to be allowed? And if so, where would I find a list of Plone's Tinymce styles that ship with Plone 5.1 so that I can see the possibilities? I want to allow all of the standard stuff such as:

and more. I'm guessing this is a pretty basic question.

I remember this problem from 4.3. Don't know if it's really an "introduced bug" in 5 or a behavior that is wrong since Plone 4.

Ths gist is: if you have a configuration (like strikethrough) that comes as default in your editor, it should work and have a json configuration format in tinymce pre configured.

The fix needed here to me is to review all style options that come as default in tinymce and check if there's a css class and a json format configuration in tinymce controlpanel.

The code snippet posted in the issue is in portuguese, but I think you can get the idea.

Unfortunately, the link https://dev.plone.org/ticket/13715 that inspired the fix is down and the wayback machine snapshot is a bit old... http://web.archive.org/web/20131025234758/https://dev.plone.org/ticket/13715