我想添加一个新的ckeditor到我的救生筏,因为我们需要限制一个可用的功能。然而,我不想改变原来的一个,因为我们以后可能需要它的另一种形式。
我如何添加一个新的ckeditor,可以用来为new内容文章创建一个结构?我是否需要为救生筏创造一个新的主题或类似的东西?
信息:我们的救生筏运行在Jboss服务器上。
编辑:
我已经创建了一个钩子,它覆盖了html\js\editor\ckeditor\ckconfig.jsp文件并添加了
config.toolbar_Mini = [
['Bold', 'Italic', 'Underline', 'Strike'],
['BulletedList']
]; 此外,我还更改了有关liferay-ui:input editor的\html\portlet\journal\article\content.jsp文件中的行。
<div class="journal-article-component-container">
<liferay-ui:input-editor contentsLanguageId="<%= Validator.isNotNull(toLanguageId) ? toLanguageId : defaultLanguageId %>" editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" name="articleContent" toolbarSet="Mini" width="100%" />
</div>其他已经可用的toolbarSet选项(如phone或simple )也没有任何效果。我也重新启动了我的jboss服务器几次,但仍然没有效果。
而且,似乎html\js\editor\ckeditor\config.js文件中所做的更改对任何事情(例如alert("foo"))都没有任何影响。
发布于 2016-05-11 00:58:48
您可以使用toolbarSet属性的lifeary-ui:input-editor标记。
您必须使用救生圈插件挂钩覆盖ckconfig.jsp,以添加自定义ckeditor配置,该配置表示您的自定义工具栏。
将下面的代码添加到ckconfig.jsp中。config.toolbar_customToolbar=[ ['FontSize', 'TextColor', 'BGColor', '-', 'Bold', 'Italic', 'Underline', 'Strike']];
然后,在使用lifeary-ui:input-editor标记时,提供toolbarSet属性值作为toolbarSet=custom-toolbar。
文本格式化程序用于映射config.toolbar_XXXXX,因此toolbarSet的自定义工具栏值将映射到customToolbar (config.toolbar_customToolbar)。
希望这能有所帮助。
https://stackoverflow.com/questions/37114324
复制相似问题