简体   繁体   English

如何在TinyMCE4中添加自定义“帮助”菜单?

[英]How do I add a custom Help menu to TinyMCE4?

I am using a custom menu for TinyMCE4. 我正在为TinyMCE4使用自定义菜单。 In the initialization call, my menu setup looks like this: 在初始化调用中,我的菜单设置如下所示:

menu : {
  ... <other menu sections>
  help:   { title: 'Help',   items: 'help' }
},

I was expecting this to yield the following, which is what you get by default or when the Help item is in the menubar property (blue highlighting is mine): 我期望这会产生以下结果,这是默认情况下或菜单栏属性(蓝色突出显示为我的)中的“帮助”项时得到的结果:

帮助菜单

Instead I get nothing. 相反,我什么也没得到。

How can I manually include the help menu? 如何手动添加帮助菜单?

EDIT : This defect was fixed in TinyMCE 4.7.8 so its no longer correct to name the item 'Help' - you should use 'help' from 4.7.8 onward. 编辑 :此缺陷已在TinyMCE 4.7.8中修复,因此将其命名为'Help'不再正确-您应从4.7.8开始使用'help'

Due to a defect in TinyMCE you need to use this code: 由于TinyMCE的缺陷,您需要使用以下代码:

help: { 
    title: 'Help',
    items: 'Help'
}

...note the items value starts with H not h . ...注意items值以H而不是h开头。 Here is a working example: 这是一个工作示例:

http://fiddle.tinymce.com/Nkgaab/1 http://fiddle.tinymce.com/Nkgaab/1

The incorrect need to use Help will be fixed in a future TinyMCE release at which point you will need to modify the configuration to use help . 不正确的使用Help将在以后的TinyMCE版本中修复,此时您将需要修改配置以使用help

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM