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.HtmlUtil" %>
18 <%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
21 String cssPath = ParamUtil.getString(request, "cssPath");
22 String cssClasses = ParamUtil.getString(request, "cssClasses");
23 String languageId = ParamUtil.getString(request, "languageId");
24 long wikiPageResourcePrimKey = ParamUtil.getLong(request, "wikiPageResourcePrimKey");
25 String attachmentURLPrefix = ParamUtil.getString(request, "attachmentURLPrefix");
26 boolean resizable = ParamUtil.getBoolean(request, "resizable");
28 String linkButtonBar = "['Link', 'Unlink']";
30 if (wikiPageResourcePrimKey > 0) {
31 linkButtonBar = "['Link', 'Unlink', 'Image']";
35 CKEDITOR.config.attachmentURLPrefix = '<%= HtmlUtil.escapeJS(attachmentURLPrefix) %>';
37 CKEDITOR.config.bodyClass = 'html-editor <%= HtmlUtil.escapeJS(cssClasses) %>';
39 CKEDITOR.config.decodeLinks = true;
41 CKEDITOR.config.disableObjectResizing = true;
43 CKEDITOR.config.extraPlugins = 'creole,wikilink';
45 CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre';
47 CKEDITOR.config.height = 265;
49 CKEDITOR.config.language = '<%= HtmlUtil.escapeJS(languageId) %>';
51 CKEDITOR.config.removePlugins = [
81 CKEDITOR.config.resize_enabled = '<%= resizable %>';
83 CKEDITOR.config.toolbar_creole = [
84 ['Cut','Copy','Paste','PasteText','PasteFromWord'],
86 ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList' ],
89 ['Table', '-', 'HorizontalRule', 'SpecialChar' ],
90 ['Find','Replace','-','SelectAll','RemoveFormat'],