LifeRay和语法突出显示/代码美化/代码格式

时间:2011-04-02 00:38:11

标签: syntax-highlighting liferay

我正在尝试将LifeRay作为内部知识库,其中一小部分内容将是代码/ sql代码段。

在代码着色/格式化等方面可以做些什么......是否有LifeRay插件可以添加这种功能?我做了一些搜索,找不到任何东西。

例如为: http://alexgorbatchev.com/SyntaxHighlighter/

感谢。

1 个答案:

答案 0 :(得分:1)

可以将Liferay配置为使用多个编辑器,例如TinyMCE或CKEditor。此配置通常通过在portal-ext.properties主文件中设置属性来完成,该文件扩展了嵌入式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

它可用于创建一个新的jsp,专门用于激活专用语法编辑器。 Liferay使用CodePress作为XML编辑器的一些配置,这可能是一个好的开始:看看 liferay-portal-6.1.0 / tomcat-6.0.29 / webapps / ROOT / html / js / editor / codepress / index.html作为开始。

阿诺

相关问题