Style information made by TinyMCE (like colored words) is an inline bit of CSS. Unfortunately, TinyMCE styles like colored words only seem to save correctly when the Drupal "Input Format" is set to Full HTML. Setting the input format to Full HTML, however, could allow unacceptable risks like malicious Javascript. Is there a way to keep the full functionality of TinyMCE and leave the Input Format as "Filtered HTML"? I'd even settle for partial functionality.

Comments

rpghost’s picture

I think it SAVES them correctly but Filtered HTML strips them when loaded again later. I'm looking for a solution right now but most of what I found was not valid for tinytinymce which I'm using.

James

ñull’s picture

Status: Active » Closed (fixed)

Either you work with Full HTML or you create a special Filter for all the HTML tags that a user role willl use in TinyMCE. Seems like your issue is not with this module but with your understanding of content filtering.

archer007’s picture

Status: Closed (fixed) » Active

Com2, how is that even possible? I tried allowing the element, but even then it would not save the inline CSS style info!

Andrew Schulman’s picture

I also have this problem: all style information is lost on save. And, that's with the full HTML input format.

ñull’s picture

What I understood is that Drupal filters out predicated code, like in-line styles, if you use any HTML filtering. This would make most of Tiny MCE's code filtered away. I am now making a customised style sheet for text ajust image left or right align etc. to do it the "right way".... Otherwise only Full HTML would work.

Then at the other hand you have to keep in mind that Tiny does its own filtering, that is controlled by

tinyMCE.init({
......
extended_valid_elements : "a[class|name|href|target|title|onclick],img[style|class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
......
});

I use tinytiny module and there you can set it from its Drupal Admin page. In this tiny module you have to edit in the module itself or some inc file of it (look at documentation). extended_valid_elements extends or overrides the default, so you can "correct" what is missing. All that is not valid is stripped by TinyMCE.

mupsi’s picture

Issue summary: View changes
Status: Active » Closed (outdated)