O'Reilly logo

PrimeFaces Cookbook - Second Edition by Oleg Varaksin, Mert Çalışkan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rich text editing with the editor

An input component editor, provides rich text editing features. It contains a toolbar that can also be configured with custom controls to provide more functionality to the user.

How to do it…

The basic component declaration for editor, which renders default controls such as indentation, and font and color selection, would be as follows:

<p:editor value="#{editorBean.text}" />

The component will be rendered on the page with default controls as shown in the following screenshot:

How to do it…

There's more…

The editor component offers the controls attribute, which can be used to customize the toolbar of the editor. For instance, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required