我在普通的Connections 5 CR6安装上安装了TinyMCE editor,现在想要添加插件。HCL告诉我们,我们已经将TinyMCE的pro版本与Connections一起授权。pro插件的一个例子是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应用程序后,我获得了控制台输出。
转载请注明出处:http://www.yojatech.com/article/20230526/1311055.html