Editor is an input component with rich text editing features.
<div class="card">
    <h:form>
        <h5 class="mt-0">Basic</h5>
        <p:textEditor widgetVar="editor1" value="#{editorView.text}" height="300px"  />
        <h3 class="first">Custom Toolbar</h3>
        <p:textEditor widgetVar="editor2" value="#{editorView.text2}" height="300px" placeholder="Enter your content" required="true">
            <f:facet name="toolbar">
             <span class="ql-formats">
                <button class="ql-bold"></button>
                <button class="ql-italic"></button>
                <button class="ql-underline"></button>
                <button class="ql-strike"></button>
            </span>
                <span class="ql-formats">
                <select class="ql-font"></select>
                <select class="ql-size"></select>
            </span>
            </f:facet>
        </p:textEditor>
        <p:commandButton value="Save" update="@form" icon="pi pi-check"/>
    </h:form>
</div>
package org.primefaces.showcase.view.input;
import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Named;
import io.quarkus.runtime.annotations.RegisterForReflection;
@Named
@RequestScoped
@RegisterForReflection(serialization = true)
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;
    }
}