TinyMCE iframe没有显示出来

时间:2012-09-16 20:59:37

标签: php ajax editor tinymce

我有一个ajax调用,它返回一个iframe到tinyMCE编辑器。大纲显示但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
        }
    }); 
}
});

0 个答案:

没有答案