【发布时间】:2019-10-21 16:18:22
【问题描述】:
我在 vanilla Connections 5 CR6 安装上安装了 TinyMCE editor,现在想要添加插件。 HCL 告诉我们,我们拥有与 Connections 一起获得授权的 TinyMCE 专业版。专业插件的一个例子是the checklist,我想安装它。
所以我在config.js 文件的externalPlugins 数组中添加了清单的插件文件以及列表(需要作为依赖项):
externalPlugins: [
{
name: "checklist",
url: pluginBaseDir + "checklist/plugin.min.js",
off: []
},{
name: "lists",
url: pluginBaseDir + "lists/plugin.min.js",
off: []
}
]
并将checklist 添加到工具栏:
toolbar: [
"undo",
{
label: "group.insert",
items: [
{
id: "insert",
label: "menu.insert",
items: [
[
"checklist",
"link",
"conn-insert",
"bookmark",
"media",
"pageembed",
"table",
"codesample"
],
[
"specialchar",
"hr"
]
]
}
]
},
"style",
"emphasis",
"align",
"listindent",
"format",
[
"conn-other",
"conn-emoticons",
"conn-macros"
],
"language",
"tools"
]
其中pluginBaseDir 设置为/connections/resources/web/tiny.editors.connections/tinymce/plugins/。请求的 JS 文件是可访问的,我使用 curl 验证了这一点。
但未显示该按钮。我试过了
在第一级添加checklist
toolbar: [
"checklist",
"undo"
// ...
添加tmce前缀
在示例config.js 文件中了解这一点:
toolbar: [
"tmce-checklist",
"undo"
// ...
测试程序
在config.js 上的每次更改后,我通过使用 jython wsadmin 脚本停止和启动公共应用程序来重新启动它们。这是可行的,可以使用postCreateTextboxio 方法轻松验证,该方法可以包含在配置对象中:
postCreateTextboxio: function(editor) {
console.log("custom.js revision #2");
}
所以我在重新启动 Common 应用程序后得到了控制台输出。
【问题讨论】:
标签: javascript tinymce websphere ibm-connections