Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/476.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript TinyMCE:启用单个按钮_Javascript_Html_Tinymce_Text Editor - Fatal编程技术网

Javascript TinyMCE:启用单个按钮

Javascript TinyMCE:启用单个按钮,javascript,html,tinymce,text-editor,Javascript,Html,Tinymce,Text Editor,我可以添加单个按钮吗 我想给用户控制,但不是太多的控制,所以我需要启用一些按钮,但禁用其他 这能做到吗?我现在已经弄明白了 你必须使用一个主题。我使用了一个预定义的主题,并在init函数中这样做: tinyMCE.init({ theme : "advanced", mode: "exact", elements : "elm1", theme_advanced_toolbar_location : "top", theme_advanced_button

我可以添加单个按钮吗

我想给用户控制,但不是太多的控制,所以我需要启用一些按钮,但禁用其他


这能做到吗?

我现在已经弄明白了

你必须使用一个主题。我使用了一个预定义的主题,并在init函数中这样做:

tinyMCE.init({
    theme : "advanced",
    mode: "exact",
    elements : "elm1",
    theme_advanced_toolbar_location : "top",
    theme_advanced_buttons1 : "bold,italic,underline,separator,"
        + "formatselect,bullist,numlist,link,unlink,image,separator,"
            +"undo,redo,cleanup,code,separator,charmap",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
});
您可以将您的文本区域命名为elm1,然后选择good to go