TTMCE seems to be working correctly, in that when I examine the body of a node in the database I see the formatting codes. However, when I view the node, these codes are stripped out. Is there a further step I need to take to have the formatting codes recognized? (I'm sure this is a real noob question).
My init script:
tinyMCE.init({
mode : "exact",
init_instance_callback : "resizeEditorBox",
theme : "advanced",
convert_urls : false,
plugins : "safari,pagebreak,style,searchreplace,contextmenu,paste,directionality,nonbreaking",
theme_advanced_buttons1 : "bold,italic,underline,|,cut,copy,paste,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,cleanup,help,|, fullscreen",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
extended_valid_elements : "a[name|href|target|title|onclick],span[class|align|style]",
template_external_list_url : "example_template_list.js",
});
For example, text that is formatted as bold gets tagged thusly:
<span style="font-weight: bold;">Bold text</span>
...and span is included in the valid elements. This is how it's saved in the database too. When I view the node and view HTML source, the span tags are removed. I'm using the default theme (garland).
What am I missing?
Thanks!
Comments
Comment #1
speersd commentedThe answer seems to be that I need to disable all the filters in my default input filter in order for this to work. :)
Comment #2
Steve Lockwood commentedThe usual reason for this is that your content is saved in "Filtered HTML" format. To see all the formatting you need to specify "Full HTML" for the document (or as the system default). see admin/settings/filters
You can do this when you create the page - just select the correct input format. Or you can make it the default format. You should not need to disable filters unless you have applied some filters to the "Full HTML" input format.