2009-06-11 110 views
4

tinyMCE的最新版本剥离了我的嵌入标签,并在我使用它时使用javascript。我尝试将verify_html标志设置为false,但没有任何运气。这里是我的tinyMCE的配置js,任何人都可以看到我做错了什么?使用tinyMCE剥离的HTML标签

更新:我认为这不是服务器端问题。我用一个简单的textarea没有tinymce加载,它的工作完美。这是tinyMCE做剥离。

tinyMCE.init({ 
    // General options 
    mode: "textareas", 
    theme: "advanced", 
    plugins: 
safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell, 
insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality, 
fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups", 
    valid_elements: "*[*]", 
    verify_html : false, 


    // Theme options 
    theme_advanced_buttons1:  
    bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright, 
justifyfull,|,formatselect,fontselect,fontsizeselect|,ltr,rtl,|,fullscreen|,forecolor, 
backcolor,code", 
    theme_advanced_buttons2: 
    "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|, 
outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,advhr", 
    theme_advanced_buttons3: 
"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media", 
    theme_advanced_toolbar_location: "top", 
    theme_advanced_toolbar_align: "left", 
    theme_advanced_statusbar_location: "bottom", 
    theme_advanced_resizing: true, 
    height: "500px", 

    // Example word content CSS (should be your site CSS) this one removes paragraph 
    // margins 
    content_css: "content/word.css", 

    // Drop lists for link/image/media/template dialogs 
    template_external_list_url: "lists/template_list.js", 
    external_link_list_url: "lists/link_list.js", 
    external_image_list_url: "lists/image_list.js", 
    media_external_list_url: "lists/media_list.js", 

    // Replace values for the template plugin 
    template_replace_values: { 
     username: "Some User", 
     staffid: "991234" 
    } 
}); 
+0

再次更新。 – 2009-06-11 18:32:38

回答

3

更新#2

做一些更多的挖掘后,你应该尝试以下。

集:

media_strict: false 

,并为<embed>标签的设置:

+'embed[width|height|name|flashvars|src|bgcolor|align|play|loop|quality|allowscriptaccess|type|pluginspage]' 

源(MoxieCode Forum


更新

你设置extended_valid_elements,但不设置valid_elements

valid_elements: "*[*]" 

extended_valid_elements用于当前的规则。但valid_elements允许您实际创建该规则集。


旧答

你确定它的TinyMCE的做,而不是无论是解析服务器端的请求?

如果您使用的是ASP.NET,请确保为页面设置了ValidateRequest="False"。如果您使用ASP.NET MVC,那么你就需要把以下控制器动作上面:

[ValidateInput(false)] 

确保你至少使用whitelist to keep bad stuff out,虽然。