I've an issue on TinyMCE and Plone 5 but I'm not sure if the core of the problem is in Plone CMS or TinyMCE.
I'm adding custom styles in the TinyMCE control panel configuration ("TinyMCE Settings" --> "Inline styles").
The new configuration is something like this:
Bold|bold|bold
Italic|italic|italic
Underline|underline|underline
Strikethrough|strikethrough|strikethrough
Superscript|superscript|superscript
Subscript|subscript|subscript
Code|code|code
Custom style|customClass|custom-class
Then the TinyMCE editor renders the menu correctly:
But the news entry is "disabled", clicking on it will do nothing. Inspecting the markup of the TinyMCE menu I find:
<div aria-checked="false" aria-disabled="true" role="menuitem" id="mceu_155" class="mce-menu-item mce-menu-item-preview mce-stack-layout-item mce-last mce-disabled" tabindex="-1">
<i class="mce-ico mce-i-custom-class"></i>
<span id="mceu_155-text" class="mce-text">Custom style</span>
</div>
So: TinyMCE is disabling it. The issue seems related to the class I'm using, not about the name I give or the missing icon. If I use a duplicate of another style, like...
...
Custom style|italic|custom-class
...it works. The same if I use another well know Plone class like...
...
Custom style|discreet|custom-class
... but someway other classes are not allowed.
Is this related to TinyMCE internals? Is TinyMCE someway "testing" the class to enable/disabled them? Or is this issue related to Plone?