TinyMCE剥离跨度

时间:2012-07-18 10:23:10

标签: javascript tinymce

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" 

});

有问题的范围是使用'forecolor'按钮创建的,看起来像<span style="color: rgb(0, 255, 0); ">foo</span>

任何想法都会很棒。

1 个答案:

答案 0 :(得分:2)

我创造了一个小小的小提琴来展示这个问题 - 它就在那里。 我稍微调整了有效元素。它现在有效。请看这里的小小提琴:http://fiddle.tinymce.com/RNbaab/10