tinymce禁用和启用编辑器并显示文本(不是html)

tinymce禁用和启用编辑器并显示文本(不是html),tinymce,Tinymce,我的页面中有两个编辑器。当我点击一个按钮时,我希望它们被禁用 如果可能的话,我希望它成为一个普通的文本区域,并看到它的文本作为一个普通的文本,而不是html 我看到了其他关于残疾的问题,但没有让它们发挥作用 这是我的代码: function create_text_editor() { $('#remarks1').tinymce( { script_url : 'resources/tinymce/

我的页面中有两个编辑器。当我点击一个按钮时,我希望它们被禁用

如果可能的话,我希望它成为一个普通的文本区域,并看到它的文本作为一个普通的文本,而不是html

我看到了其他关于残疾的问题,但没有让它们发挥作用

这是我的代码:

function create_text_editor()
    {
            $('#remarks1').tinymce(
            {
                    script_url : 'resources/tinymce/jscripts/tiny_mce/tiny_mce.js',
                    theme : "advanced",
                    theme_advanced_buttons1 :         "cut,copy,paste,|,bold,italic,underline,|,undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|" ,
                    theme_advanced_buttons2 :         "formatselect,fontselect,fontsizeselect,|,forecolor,backcolor,|",
                    theme_advanced_buttons3 :         "",
                    theme_advanced_toolbar_location : "top",
                    theme_advanced_toolbar_align :    "left",
                    plugins :                         "paste" ,               
                    oninit : on_editor_init                                       });

             $('#remarks2').tinymce(
            {
                    script_url : 'resources/tinymce/jscripts/tiny_mce/tiny_mce.js',
                    theme : "advanced",
                    theme_advanced_buttons1 :         "cut,copy,paste,|,bold,italic,underline,|,undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|" ,
                    theme_advanced_buttons2 :         "formatselect,fontselect,fontsizeselect,|,forecolor,backcolor,|",
                    theme_advanced_buttons3 :         "",
                    theme_advanced_toolbar_location : "top",
                    theme_advanced_toolbar_align :    "left",
                    plugins :                         "paste" ,                 
                    oninit : on_editor_init                });
    }
“on_editor_init”是emtpy

任何帮助都将被告知


提前感谢。

您需要调用save函数并关闭tinymce。当然,您可以在按下tinymce UI按钮时执行此代码(我想您知道它是如何工作的)


现在,您应该能够在初始化tinymce之前查看网站上的文本区域。

您需要调用save函数并关闭tinymce。当然,您可以在按下tinymce UI按钮时执行此代码(我想您知道它是如何工作的)

现在,您应该能够在初始化tinymce之前看到网站上的textarea

tinymce.get(editor_id).save();

tinymce.execCommand('mceRemoveControl', true, editor_id);