TinyMCE は、次の構成を使用してスパンを削除しています。
tinyMCE.init({
mode : "specific_textareas",
theme_advanced_resizing_min_width : 550,
editor_selector : /(tiny_mce|image_mce)/,
theme : "advanced",
editor_deselector : "mceNoEditor",
body_class : "cms",
content_css : "/css/content.css",
plugins : "safari, inlinepopups, paste, table",
file_browser_callback : "tinyBrowser",
width : 640,
height : 500,
paste_auto_cleanup_on_paste : true,
theme_advanced_buttons1 : "bold, italic, underline, justifyleft,justifycenter, justifyright, justifyfull , formatselect, |, pasteword ,pastetext, code ",
theme_advanced_buttons2 : "undo,redo,|,bullist, numlist,| , outdent,indent, |, link, unlink, image, forecolor",
theme_advanced_buttons3 : "tablecontrols",
theme_advanced_resizing : true,
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_statusbar_location : "bottom",
theme_advanced_blockformats : "p,h2,h4",
convert_urls : false,
verify_html : true,
valid_elements : "@[class|style|title],br,h2,h3,h4,-p[align],-strong/b,a[name|href|target]," +
"img[src|border=0|alt|width|height|align],hr[width|size|noshade],-em/i,-span" +
"table[border|cellspacing|cellpadding|width],tr[rowspan],td[colspan],th[colspan],-ul,-ol,-li"
});
問題のスパンは「前景色」ボタンで作成され、次のようになります<span style="color: rgb(0, 255, 0); ">foo</span>
。
どんなアイデアでも素晴らしいでしょう。