LifeRay and Syntax Highlighting / Code Beautifier / Code Formatting
I'm experimenting with LifeRay as an internal knowledge base, and a chunk of that content would be code/sql snippets.
What can be done in the area of code coloring / formatting, etc... is there a LifeRay plugin that adds this kind of capability? I did some searching and couldn't find anything.
E.g.: http://alexgorbatchev.com/SyntaxHighlighter/
开发者_开发百科Thanks.
Liferay can be configured to use several editors, such as TinyMCE or CKEditor. This configuration is usually done by setting properties in the main portal-ext.properties file, that extends the embedded portal.properties :
# You can configure individual JSP pages to use a specific implementation of
# the available WYSIWYG editors: ckeditor, ckeditor_bbcode, ckeditor_creole,
# fckeditor, liferay, simple, tinymce, or tinymce_simple.
#
editor.wysiwyg.default=ckeditor
(...)
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp=ckeditor
It can be used to create a new jsp especially designed to allow the activation of a dedicated syntax editor. Liferay uses CodePress as a XML editor for some of its configuration, that could be a good start : look at liferay-portal-6.1.0/tomcat-6.0.29/webapps/ROOT/html/js/editor/codepress/index.html as a start.
Arnaud
精彩评论