Editor is an input component with rich text editing features. Toolbar can be configured with custom controls.
* Deprecated, use TextEditor instead
<h:form> <p:editor id="editor" widgetVar="editorWidget" value="#{editorView.text}" width="600" /> <h:panelGrid columns="2" style="margin-top: 10px"> <p:commandButton value="Submit" update="display" oncomplete="PF('dlg').show()" icon="pi pi-save" /> <p:commandButton value="Clear" type="button" onclick="PF('editorWidget').clear();" icon="pi pi-times" /> </h:panelGrid> <p:dialog header="Content" widgetVar="dlg" showEffect="fade" hideEffect="fade"> <h:outputText id="display" value="#{editorView.text}" escape="false" /> </p:dialog> </h:form>
@Named @RequestScoped public class EditorView { private String text; private String text2; public String getText() { return text; } public void setText(String text) { this.text = text; } public String getText2() { return text2; } public void setText2(String text2) { this.text2 = text2; } }