All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.message_boards.bbcode_editor.jspf Maven / Gradle / Ivy

<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */
--%>

<%
Map configParams = new HashMap();

configParams.put("emoticonsPath", themeDisplay.getPathThemeImages() + MBUtil.EMOTICONS);

if (quote && Validator.isNull(body) && (curParentMessage != null)) {
	StringBundler sb = new StringBundler(5);

	sb.append("[quote=");
	sb.append(StringUtil.replace(parentAuthor, new String[] {"[", "]", "(", ")"}, new String[] {"[", "]", "(", ")"}));
	sb.append("]");
	sb.append(curParentMessage.getBody(false));
	sb.append("[/quote]\n\n\n");

	body = sb.toString();
}
else if (splitThread && Validator.isNull(body)) {
	StringBundler sb = new StringBundler(5);

	sb.append("[url=");
	sb.append(MBThreadConstants.NEW_THREAD_URL);
	sb.append("]");
	sb.append(MBThreadConstants.NEW_THREAD_URL);
	sb.append("[/url]");

	body = LanguageUtil.format(request, "the-new-thread-can-be-found-at-x", sb.toString(), false);
}

String bbcoceEditorName = PropsUtil.get(MBUtil.BB_CODE_EDITOR_WYSIWYG_IMPL_KEY);

if (bbcoceEditorName.equals("bbcode")) {
	bbcoceEditorName = "ckeditor_bbcode";

	if (_log.isWarnEnabled()) {
		_log.warn("Replacing unsupported BBCode editor with CKEditor BBCode");
	}
}
%>




	function getHTML() {
		return window.editor.getHTML();
	}


<%!
private static Log _log = LogFactoryUtil.getLog("com_liferay_message_boards_web.message_boards.bbcode_editor_jspf");
%>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy