Configuration tinymce不';不服从有效元素的扩展

Configuration tinymce不';不服从有效元素的扩展,configuration,iframe,tinymce,Configuration,Iframe,Tinymce,我正在尝试设置tinyMCE,以便它能够与google maps iframe一起工作。TinyMCE清理程序会将iframe剥离 所以我找到了一个解决方案,就是说我需要在tinyMCE.init中插入一个extend\u有效元素:“iframe” 但不管怎样,它会去掉我的iframe。我尝试添加iframe或iframe[*]或iframe[src | width | height | name | align],但它不起作用。但是,如果我更改cleanup=false,则它不会删除ifram

我正在尝试设置tinyMCE,以便它能够与google maps iframe一起工作。TinyMCE清理程序会将iframe剥离

所以我找到了一个解决方案,就是说我需要在tinyMCE.init中插入一个
extend\u有效元素:“iframe”

但不管怎样,它会去掉我的iframe。我尝试添加
iframe
iframe[*]
iframe[src | width | height | name | align]
,但它不起作用。但是,如果我更改
cleanup=false
,则它不会删除iframe。但我宁愿用正确的方法

我的

tinyMCE.init({
主题:“高级”,
模式:“文本区域”,
编辑器\选择器:“rte”,
转换URL:false,
content_css:“”,
插件:“表格、粘贴、xhtmlxtras、safari”,
文件\浏览器\回调:“tinyBrowser”,
主题高级按钮1:“粗体、斜体、下划线、分隔符、左对齐、中对齐、右对齐、全对齐、粗体、numlist、撤消、重做、sub、sup、链接、取消链接、图像、粘贴文本、粘贴字、全选、前景色、背景色、首字母缩写、del、formatselect、fontsizeselect”,
主题\高级\按钮2:“表格控件、清理、移除格式、代码”,
主题\高级\按钮3:“”,
主题\高级\工具栏\位置:“顶部”,
主题\高级\工具栏\对齐:“左”,
主题\高级\路径\位置:“底部”,
粘贴上的自动清理粘贴:true,
主题\u高级\u大小调整:错误,
句柄事件回调:函数CleanupHTML回调(e)
{
如果(e.ctrlKey&&e.keyCode==86&&e.type!=“keyup”)
{
setTimeout('tinyMCE.execInstanceCommand('+e.target.editorId+','mceCleanup',true'),1);
//返回false;
}
返回true;
},
force_p_新行:false,
force\u br\u新词:对,
将换行符转换为\u brs:false,
删除换行符:false,
启动时清除:false,
扩展有效元素:“iframe[src | width | height | name | align]”,
//无效的_元素:“script、onclick、ondblick、onkeydown、onkeypress、onkeydup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup、font”,
高度:“500”
});

您需要使用正确的名称正确设置配置参数,而不是扩展有效的元素。

您需要使用正确的名称正确设置配置参数,而不是扩展有效的元素。

很高兴能够提供帮助很高兴能够提供帮助
tinyMCE.init({
        theme : "advanced",
        mode : "textareas",
        editor_selector : "rte",
        convert_urls : false,
        content_css : "<?php echo $html->url("/css/rte.css") ?>",
        plugins : "table, paste, xhtmlxtras, safari",
        file_browser_callback : "tinyBrowser",
        theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,sub,sup,link,unlink,image,pastetext, pasteword, selectall, forecolor, backcolor,acronym,del,formatselect,fontsizeselect",
        theme_advanced_buttons2 : "tablecontrols,cleanup,removeformat,code",
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_path_location : "bottom",
        paste_auto_cleanup_on_paste : true,
        theme_advanced_resizing : false,
        handle_event_callback: function CleanupHTML_callback(e)
        {
                if (e.ctrlKey && e.keyCode == 86 && e.type != "keyup")
                {
                        setTimeout('tinyMCE.execInstanceCommand("'+e.target.editorId+'", "mceCleanup", true)',1);
                        //return false;
                }
                return true;
        },
        force_p_newlines : false,
        force_br_newlines : true,
        convert_newlines_to_brs : false,
        remove_linebreaks : false,
        cleanup_on_startup : false,
        extend_valid_elements : "iframe[src|width|height|name|align]",
        //invalid_elements : "script,onclick,ondblclick,onkeydown,onkeypress,onkeyup,onmousedown,onmousemove,onmouseout,onmouseover,onmouseup,font",
        height: "500"
});