Editor

Editor is an input component with rich text editing features. Toolbar can be configured with custom controls.

Content

Source

<h:form id="form">

    <p:editor id="editor" value="#{editorBean.value}" width="600"/>

    <h:panelGrid columns="2" style="margin-top:10px">
        <p:commandButton id="submitButton" value="Submit" update="display" oncomplete="PF('dlg').show()"
                        icon="ui-icon-disk" />
        <p:commandButton id="clearButton" type="button" value="Clear" onclick="PF('editor').clear()"
                        icon="ui-icon-close" />
    </h:panelGrid>

    <p:dialog header="Content" widgetVar="dlg" showEffect="fade" hideEffect="fade" modal="true">
        <h:outputText id="display" value="#{editorBean.value}" escape="false" />
    </p:dialog>

</h:form>