3 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
5 * This library is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License as published by the Free
7 * Software Foundation; either version 2.1 of the License, or (at your option)
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17 <%@ page import="com.liferay.portal.kernel.util.ContentTypes" %>
18 <%@ page import="com.liferay.portal.kernel.util.HtmlUtil" %>
19 <%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
22 String cssPath = ParamUtil.getString(request, "cssPath");
23 String cssClasses = ParamUtil.getString(request, "cssClasses");
24 String languageId = ParamUtil.getString(request, "languageId");
26 response.setContentType(ContentTypes.TEXT_JAVASCRIPT);
29 if (!CKEDITOR.stylesSet.get('liferayStyles')) {
30 CKEDITOR.addStylesSet(
36 {name: 'Normal', element: 'p'},
37 {name: 'Heading 1', element: 'h1'},
38 {name: 'Heading 2', element: 'h2'},
39 {name: 'Heading 3', element: 'h3'},
40 {name: 'Heading 4', element: 'h4'},
44 {name: 'Preformatted Text', element:'pre'},
45 {name: 'Cited Work', element:'cite'},
46 {name: 'Computer Code', element:'code'},
50 {name: 'Info Message', element: 'div', attributes: {'class': 'portlet-msg-info'}},
51 {name: 'Alert Message', element: 'div', attributes: {'class': 'portlet-msg-alert'}},
52 {name: 'Error Message', element: 'div', attributes: {'class': 'portlet-msg-error'}}
57 CKEDITOR.config.bodyClass = 'html-editor <%= HtmlUtil.escapeJS(cssClasses) %>';
59 CKEDITOR.config.entities = false;
61 CKEDITOR.config.height = 265;
63 CKEDITOR.config.language = '<%= HtmlUtil.escapeJS(languageId) %>';
65 CKEDITOR.config.stylesCombo_stylesSet = 'liferayStyles';
67 CKEDITOR.config.scayt_autoStartup = true;
69 CKEDITOR.config.scayt_sLang = "fr_FR";
71 CKEDITOR.config.language = 'fr';
73 CKEDITOR.config.extraPlugins = 'equation,imagepaste';
75 CKEDITOR.config.toolbar_editInPlace = [
77 ['Bold', 'Italic', 'Underline', 'Strike'],
78 ['Subscript', 'Superscript', 'SpecialChar'],
80 ['SpellChecker', 'Scayt'],
81 ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'], ['Source', 'RemoveFormat'],
84 CKEDITOR.config.toolbar_email = [
85 ['FontSize', 'TextColor', 'BGColor', '-', 'Bold', 'Italic', 'Underline', 'Strike'],
86 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
87 ['SpellChecker', 'Scayt'],
89 ['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SelectAll', 'RemoveFormat'],
95 CKEDITOR.config.toolbar_liferay = [
96 ['Styles', 'FontSize', '-', 'TextColor', 'BGColor'],
97 ['Bold', 'Italic', 'Underline', 'Strike'],
98 ['Subscript', 'Superscript'],
100 ['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SelectAll', 'RemoveFormat'],
101 ['Find', 'Replace', 'SpellChecker', 'Scayt'],
102 ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'],
103 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
106 ['Link', 'Unlink', 'Anchor'],
107 ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
111 CKEDITOR.config.toolbar_liferayArticle = [
112 ['Styles', 'FontSize', '-', 'TextColor', 'BGColor'],
113 ['Bold', 'Italic', 'Underline', 'Strike'],
114 ['Subscript', 'Superscript'],
116 ['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SelectAll', 'RemoveFormat'],
117 ['Find', 'Replace', 'SpellChecker', 'Scayt'],
118 ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
119 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
122 ['Link', 'Unlink', 'Anchor'],
123 ['Image', 'Flash', 'Table', '-', 'Smiley', 'SpecialChar', 'LiferayPageBreak']