JBoss.orgCommunity Documentation
The <rich:insert> component is used for highlighting, source code inserting and, optionally, format the file from the application context into the page.
The are two basic attributes. The "src" attribute defines the path to the file with source code. The "highlight" attribute defines the type of a syntax highlighting.
If "highlight" attribute is defined and JHighlight open source library is in the classpath, the text from the file is formated and colorized.
An example is placed below.
Example:
...
<rich:insert src="/pages/sourcePage.xhtml" highlight="xhtml"/>
...
The result of using <rich:insert> component is shown on the picture:
The <rich:insert> component provides the same functionality as JHighlight. Thus, all names of highlight style classes for source code of particular language could be changed to your names, which are used by the JHighlight library.
Table of <rich:insert> attributes.
Table 6.269. Component Identification Parameters
Name | Value |
---|---|
component-type | org.richfaces.ui.Insert |
component-class | org.richfaces.ui.component.html.HtmlInsert |
component-family | org.richfaces.ui.Insert |
renderer-type | org.richfaces.ui.InsertRenderer |
tag-class | org.richfaces.ui.taglib.InsertTag |
On RichFaces LiveDemo page you can found some additional information for <rich:insert> component usage.