TinyMCE: using CSS class attributes with format-dropdown formats

I would like to configure formats in the TinyMCE formatselect dropdown list to support css class attributes.

Example. If you want to select formatselect <h2 class='foo'>instead <h2>of as the format in the drop-down list.

Does anyone have an idea how I can do this?

+3
source share
1 answer

There is no reasonable way to do this in the current version of TinyMCE according to its main developer :

. , , , .. JSON.

,

Spocke - TinyMCE

... "" :

CSS- h2.foo, TinyMCE content_css, styleselect dropdown foo.

<h2> - foo styleselect. <h2 class='foo'>.

+2

Source: https://habr.com/ru/post/1706965/


All Articles