【发布时间】:2015-10-15 10:36:36
【问题描述】:
我已经按照这些步骤在 Liferay 6.2 GA4 中添加了 CKEditor YouTube 插件,并且我可以在 Content 部分编辑器中添加插件。
CKEditor YouTube 插件:http://ckeditor.com/addon/youtube
所有插件都位于 ${LIFERAY_HOME}\tomcat-7.0.42\webapps\ROOT\html\js\editor\ckeditor\plugins 文件夹中。
1) 将 youtube 插件文件夹放在 plugins 文件夹中。
2) 在 ${LIFERAY_HOME}\tomcat-7.0.42\webapps\ROOT\html\js\editor\ckeditor 文件夹中的 config.js 文件中添加以下更改
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.extraPlugins = 'youtube';
};
3) 在 ${LIFERAY_HOME}\tomcat-7.0.42\webapps\ROOT\html\js\editor\ckeditor 文件夹中的 ckconfig.jsp 文件中添加以下 'youtube' 条目
config.extraPlugins = 'ajaxsave,media,restore,scayt,wsc,youtube';
config.toolbar_liferayArticle = [
['Styles', 'FontSize', '-', 'TextColor','BGColor'],
['Bold', 'Italic', 'Underline', 'Strike'],
['Subscript', 'Superscript'],['Youtube'],
'/',['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste',
'PasteText', 'PasteFromWord', '-', 'SelectAll','RemoveFormat'],
4) 重启 Liferay。
我知道这可以通过使用 Liferay Hook 项目来实现。
但是,当我使用 Liferay 结构和模板时,CKEditor 中不会出现此插件。 Liferay 服务器还需要做哪些其他更改?
【问题讨论】:
标签: liferay