« RichFaces - Backgrou... | Main | postfix and no worth... »

RichFaces - TinyMCE Support

Since the new version 3.3 of RichFaces JSF Framework was released the TinyMCE Editor is now included in RichFaces! This is a cool feature and allows you to use the full featured TinyMCE Editor in your richfaces webapp.

To activate the Editor use the following tag:

    <rich:editor  theme="advanced" 
           value="#{myMB.content}" />

also it is possible to customize the editor in any way TinyMCE allows customization. So I use the following configuration to change width attribute and toolbar options:

        <rich:editor id="details_id"  theme="advanced" 
            plugins="fullscreen" value="#{workitemMB.item['htmldetail']}">
            <f:param name="theme_advanced_buttons1"
                value="fullscreen,undo,redo,cleanup,|,formatselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,insertdate,inserttime,hr,outdent,indent,|,link,unlink" />
            <f:param name="theme_advanced_buttons2" value="" />
            <f:param name="theme_advanced_buttons3" value="" />
            <f:param name="theme_advanced_toolbar_location" value="top" />
            <f:param name="theme_advanced_toolbar_align" value="left" />
            <f:param name="width" value="95%" />
            <f:param name="height" value="260" />
        </rich:editor>