0

我有一个将 iframe 返回到 tinyMCE 编辑器的 ajax 调用。大纲显示,但 iframe vid 没有。我已添加extended_valid_elements: "iframe[src|width|height|name|align]",到我的 .init 但它仍然不会显示,这是我能找到的唯一修复,有什么建议吗?

初始化代码:

<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins :    "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,inse rtdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

// Theme options
theme_advanced_buttons1 :  "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 :  "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image-ajax,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media-ajax,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,

extended_valid_elements: "iframe[src|width|height|name|align]",

setup : function(ed) {
    ed.addButton("image-ajax", {
        title : "image-ajax",
        cmd : "mceimage-ajax",
        image : "js/img/image-ajax.png", 
        onclick : function() {  
            showModalPopup("image-modal-container"); // open the file upload modal
        }
    }); 

    ed.addButton("media-ajax", {
        title : "media-ajax",
        cmd : "mcemedia-ajax",
        image : "js/img/media-ajax.gif", 
        onclick : function() {  
            showModalPopup("media-modal-container"); // open the file upload modal
        }
    }); 
}
});

4

0 回答 0