更新时间:2023-12-06 14:13:46
以下配置设置代表日记帐文章ck编辑器屏幕的配置.
来自ckconfig.jsp的源代码.
config.toolbar_liferayArticle = [
['Styles', 'FontSize', '-', 'TextColor', 'BGColor'],
['Bold', 'Italic', 'Underline', 'Strike'],
['Subscript', 'Superscript'],
'/',
['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SelectAll', 'RemoveFormat'],
['Find', 'Replace', 'SpellChecker', 'Scayt'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
'/',
['Source'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Flash', <c:if test="<%= XugglerUtil.isEnabled() %>">'Audio', 'Video',</c:if> 'Table', '-', 'Smiley', 'SpecialChar', 'LiferayPageBreak']
];
Below configuration settings represents configuration for journal article ck-editor screen.
From ckconfig.jsp of source code.
config.toolbar_liferayArticle = [
['Styles', 'FontSize', '-', 'TextColor', 'BGColor'],
['Bold', 'Italic', 'Underline', 'Strike'],
['Subscript', 'Superscript'],
'/',
['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SelectAll', 'RemoveFormat'],
['Find', 'Replace', 'SpellChecker', 'Scayt'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
'/',
['Source'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Flash', <c:if test="<%= XugglerUtil.isEnabled() %>">'Audio', 'Video',</c:if> 'Table', '-', 'Smiley', 'SpecialChar', 'LiferayPageBreak']
];
因此,如果要为journal-article的CKEditor具有不同的配置设置,则必须使用liferay插件钩子修改ckconfig.jsp中的config.toolbar_liferayArticle.
So, if you want to have different configuration setting for CKEditor of journal-article then you have to modify config.toolbar_liferayArticle in ckconfig.jsp using liferay plugin hook.
例如
config.toolbar_liferayArticle=[
['Bold', 'Italic', 'Underline', 'Strike'],
['BulletedList']
];
e.g
config.toolbar_liferayArticle=[
['Bold', 'Italic', 'Underline', 'Strike'],
['BulletedList']
];