TinyMCE customize “file” menubar

前端 未结 3 1050
慢半拍i
慢半拍i 2020-12-28 16:47

Is there a way to customize (add and remove options, e.t.c..) the menubar in TinyMCE 4.0? I am unable to find any documentation on that specific part of the editor. The imag

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 17:26

    In TinyMCE 4.x version, "code" plugin is used to show/edit HTML code of the editor content.

    To control the toolbar, up to 4.0.6 version, theme_advanced_button<1-n> option was used, but above 4.0.6 version, toolbar or toolbar<1-N> option is used.

    By adding "code" plugin to the toolbar options, "Tools" menu will be added with the "Source Code" sub-menu (as button "<>" (icon)).

    tinyMCE.init({
        // ......
        // ......
        plugins: "searchreplace code",
    
        toolbar1: "separator forecolor backcolor code",
        toolbar2: "<<>>",
        toolbar3: "<<>>",
        toolbar4: "<<>>",
    });
    

提交回复
热议问题