Also multiple instances can be used on the same page.


<p:growl id="growl" showDetail="true" />

<p:commandButton oncomplete="PF('testDialog').show()" value="Open In Dialog" update="dialog" style="margin:8px;"></p:commandButton>
<p:dialog id="dialog" widgetVar="testDialog" resizable="true" closable="true" closeOnEscape="true" height="500" width="630">
    <pe:ckEditor id="dialogEditor"></pe:ckEditor>
<pe:ckEditor id="editor" value="#{editorController.content}">
    <p:ajax event="save" listener="#{editorController.saveListener}" update="growl"/>
<pe:ckEditor id="secondEditor" value="#{editorController.secondContent}">
    <p:ajax event="save" listener="#{editorController.secondSaveListener}" update="growl"/>
Components and more
Documentation pe:ckEditor
Attributes (move mouse over the names to see data types)
Name Description
id Unique identifier of the component in a naming container.
rendered Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar Name of the client side widget.
value Value of the component.
height Height of the editor. Default value: 200px.
width Width of the editor. Default value: 600px.
theme Theme of the editor.
skin Skin of the editor. Valid skins are: flat, icy_orange, kama, minimalist, moono-lisa, moono, Moono_blue, moonocolor, moono-dark, office2013.
toolbar The toolbar layout.
readonly Defines if the editor is readonly.
interfaceColor The color of the interface. For example: #33fc14.
language Default language is used in case no language is set using language option and the editor is not able to use the user language.
defaultLanguage This setting is used to set the CKEditor language. In case this option is not set, the editor will automatically try to load with user language if supported, otherwise the default language will be used.
contentsCss This setting specifies the CSS file to be used to apply style to the contents.
customConfig Path to a custom CKEditor js config file.
advancedContentFilter Defines if the CKEditor Advanced Content Filter is enabled or disabled. Default is true.
disableNativeSpellChecker By default, native browser spell check functionality is disabled in the editor. To enable it set this value to false. Default is true.
enterMode Sets the behavior of the Enter key. It also determines other behavior rules of the editor, like whether the
element is to be used as a paragraph separator when indenting text. Default is CKEDITOR.ENTER_P.
shiftEnterMode Sets the behavior of the Shift+Enter key. It also determines other behavior rules of the editor, like whether the
element is to be used as a paragraph separator when indenting text. Default is CKEDITOR.ENTER_P.
tabindex The tab index to assign to the editor. If not given, no tab index will be assigned.
label A display name for this component.
converter An EL expression or a literal text that defines a converter for the component. When it's an EL expression, it's resolved to a converter instance. In case it's a static text, it must refer to a converter id.
required Marks component as required.
escape Defines if the content of the component should be escaped or not.
requiredMessage Message to display when required field validation fails.
converterMessage Message to display when conversion fails.
validatorMessage Message to display when validation fails.
validator A method expression referring to a method validationg the input.
Events (move mouse over the names to see classes)
Name Description
savefired when the save button will be pressed
initializefired after the editor was successfully intialized
focusfired when the editor gets focus
blurfired when the editor loses focus
wysiwygModefired after switching to the wysiwyg mode
sourceModefired after switching to the source mode
dirtyfired once after the content has been changed; will be fired again after a change occurs if the editor gains focus after a blur
changefired if the content has been changed
PrimeFaces Extensions Showcase - © 2011-2020, PrimeFaces: 8.0, PrimeFaces Extensions: 8.0.2, JSF: jakarta 2.3.14, Server: jetty/9.4.36.v20210114, Build time: 2020-04-29 13:39