Using code syntax highlighter upon a p:editor text

UI Components for JSF
Post Reply
User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

11 Oct 2011, 14:14

I am rewriting a Seam 2.x + RichFaces + PrimeFaces web app, but now only with PrimeFaces.

In PrimeFaces editor, if i wish to insert source code (XML or XHTML) within <pre> it is converted to <pre>

As a result, the syntax highlighter cannot be used later when the content is displayed in a view. Is it possible to insert source code escaping certain elements and thus enable syntax highlighting?

Note:

I guess the plugins for the editor are also limited in functionality when compared to other editors like TinyMCE. http://premiumsoftware.net/cleditor/dow ... index.html

In RichFaces editor they were using TinyMCE which provided facility to escape certain tags (as below passing as a f:param)

Code: Select all

<f:param name="extended_valid_elements" value="pre[name|class],video[src|controls]"/> 
[/i]
PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests