I need to use this way because Umbraco way to add styles in settings tab of backend enables only to add tags or css classes, and doesn't tag and class together. I need when editor choose some style in drop-down this style is applied to surrounding tag of selection, but umbraco pasts span tag with style.
Does anyone know how to use standart TinyMCE command 'style_formats' or maybe another way to applay selected styles to surrounding tag?
If someone interests I solve this by hacking umbraco.controller.js (or umbraco.directives.js for grid) and inserting to the Umbraco.PropertyEditors.RTEController (gridRte directive):
TinyMCE style_formats
Hi all,
I try to use standart TinyMCE way to adding style-formants at drop-down menu in editor, like this:
To do this I add in tinyMceConfig.config at custom config section such key:
But it doesn't work correctly.
I need to use this way because Umbraco way to add styles in settings tab of backend enables only to add tags or css classes, and doesn't tag and class together. I need when editor choose some style in drop-down this style is applied to surrounding tag of selection, but umbraco pasts span tag with style.
Does anyone know how to use standart TinyMCE command 'style_formats' or maybe another way to applay selected styles to surrounding tag?
I use Umbraco 7.
Thanks for any help!
I believe you do this though the stylesheet in the backoffice. Try logging in and expanding the admin stylesheet. Click create and add the new ones.
Not sure on the styles one though, you may need to test that out a bit.
If someone interests I solve this by hacking umbraco.controller.js (or umbraco.directives.js for grid) and inserting to the Umbraco.PropertyEditors.RTEController (gridRte directive):
rte-formats.json must contain json with formats definition in tinyMCE style
Your JSON is wrong. You need to put the properties names between quotes/double quotes.
Ye, thanks Kin, it works too)
can anyone suggest how to add attributes?
*EDIT ^ This first method is correct. It is removed for some elements e.g. "span" which makes testing it confusing. End Edit*
does not seem to work. Neither does:
is working on a reply...