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.parsers.bbcode.BBCodeTranslatorUtil" %>
18 <%@ page import="com.liferay.portal.kernel.util.HtmlUtil" %>
19 <%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
20 <%@ page import="com.liferay.portal.kernel.util.StringUtil" %>
23 String cssPath = ParamUtil.getString(request, "cssPath");
24 String cssClasses = ParamUtil.getString(request, "cssClasses");
25 String imagesPath = ParamUtil.getString(request, "imagesPath");
26 String languageId = ParamUtil.getString(request, "languageId");
27 String emoticonsPath = ParamUtil.getString(request, "emoticonsPath");
28 boolean resizable = ParamUtil.getBoolean(request, "resizable");
31 CKEDITOR.config.height = 265;
33 CKEDITOR.config.removePlugins = [
56 CKEDITOR.config.toolbar_bbcode = [
57 ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Link', 'Unlink'],
58 ['Image', 'Smiley', '-', 'TextColor', '-', 'NumberedList', 'BulletedList'],
59 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'Blockquote', '-', 'Code'],
61 ['Font', 'FontSize', '-', 'Format', '-', 'Table', '-', 'Undo', 'Redo', '-', 'Source']
64 CKEDITOR.config.bodyClass = 'html-editor <%= HtmlUtil.escapeJS(cssClasses) %>';
66 CKEDITOR.config.contentsCss = '<%= HtmlUtil.escapeJS(cssPath) %>/main.css';
68 CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
70 CKEDITOR.config.extraPlugins = 'bbcode,wikilink';
72 CKEDITOR.config.filebrowserBrowseUrl = '';
74 CKEDITOR.config.filebrowserImageBrowseLinkUrl = '';
76 CKEDITOR.config.filebrowserImageBrowseUrl = '';
78 CKEDITOR.config.filebrowserImageUploadUrl = '';
80 CKEDITOR.config.filebrowserUploadUrl = '';
82 CKEDITOR.config.fontSize_sizes = '10/10px;12/12px;16/16px;18/18px;24/24px;32/32px;48/48px';
84 CKEDITOR.config.format_tags = 'p;pre';
86 CKEDITOR.config.imagesPath = '<%= HtmlUtil.escapeJS(imagesPath) %>/message_boards/';
88 CKEDITOR.config.language = '<%= HtmlUtil.escapeJS(languageId) %>';
90 CKEDITOR.config.newThreadURL = '<%= BBCodeTranslatorUtil.NEW_THREAD_URL %>';
92 CKEDITOR.config.resize_enabled = '<%= resizable %>';
94 CKEDITOR.config.smiley_descriptions = ['<%= StringUtil.merge(BBCodeTranslatorUtil.getEmoticonDescriptions(), "','") %>'];
96 CKEDITOR.config.smiley_images = ['<%= StringUtil.merge(BBCodeTranslatorUtil.getEmoticonFiles(), "','") %>'];
98 CKEDITOR.config.smiley_path = '<%= HtmlUtil.escapeJS(emoticonsPath) %>' + '/';
100 CKEDITOR.config.smiley_symbols = ['<%= StringUtil.merge(BBCodeTranslatorUtil.getEmoticonSymbols(), "','") %>'];