Developer Forum »
Editor-css: Append style to an element, not generatea span
62 posts

Hi!

I have added a css for the editor. I see that when I apply a style to something in the text, it generates span elements. This turns out wrong in this case, since I have selected the whole parapgraph (p-element), and I want to style to be appended to the p. Is this possible?

 

Attachments
181 posts

Hi!

 

Sorry for the late reply. We had to investigate this issue a little bit. 

This is a common issue with TinyMCE, and I've seen reports on the same problem in a handful of other content management systems using TinyMCE, and none of them had a proper solution to the problem that I could see. The reasoning from the TinyMCE developers is that it keeps the output consistent between different browsers. 

We'll spend some more time to try to find a fix, but I would suggest that you look for an alternative solution. I'm not convinced there is a good fix for this issue.

 

62 posts

Ok, thanks. I will show the publisher how to edit the html and add classes on the elements instead. Please let me know if a solution comes up!

1