I am using TinyMCE for capturing table row data on its row click. I am setting different values for color, font-styles such as bold, and italics for each of the table row contents through its configuration UI screen. On row-click, I want to set TinyMCE contents with the text with that particular color and font-style. However, it puts the deprecated font-styles in span tag and I do not want this. I want it to preserve the HTML text as it is received by the editor as later on I have to process it. I have tried:
tinymce.init(
{
selector:'textarea',
theme:"advanced",
theme_advanced_statusbar_location : "none",
theme_advanced_menubar_location : "none",
theme_advanced_toolbar_location : "none",
convert_fonts_to_spans : "false",
extended_valid_elements : "span[!class]",
valid_elements : "*[*]",
valid_children : "*[*]",
cleanup_on_startup : false,
cleanup : false,
}
);
even though the main developer of TinyMCE has advised against setting cleanup =false
on their forum page. Also, in spite of setting valid_elements : "*[*]"
, the deprecated tags like <b>
and <u>
are put into the style attribute of span tag.