删除 TinyMCE 4 中的菜单和状态栏 [英] Remove menu and status bars in TinyMCE 4

查看:54
本文介绍了删除 TinyMCE 4 中的菜单和状态栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 TinyMCE 4 中删除菜单和状态栏,因为我想设置一个非常基本的编辑器.这可能吗?

I am trying to remove the menu and status bars from TinyMCE 4 because I want to setup a very basic editor. Is this possible?

TinyMCE 3 的文档似乎不相关,我找不到版本 4 的任何内容.

The documentation for TinyMCE 3 does not seem to be relevant and I cannot find anything for version 4.

推荐答案

我看了一下源码,很明显:

I looked at the source and it was fairly obvious:

tinyMCE.init({
    menubar:false,
    statusbar: false,
        //etc
})

这会删除两者.

您还可以通过指定一串启用的菜单来自定义默认菜单栏的哪些部分可见 - 例如menubar: '文件编辑'

You can also customise what parts of the default menu bar are visible by specifying a string of enabled menus - e.g. menubar: 'file edit'

您可以像这样定义自己的菜单:

You can define your own menus like this:

menu : {    
    test: {title: 'Test Menu', items: 'newdocument'} 
},
menubar: 'test'

这篇关于删除 TinyMCE 4 中的菜单和状态栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆