inputRichText - Rich Text

Displays an input field for entering data formatted as rich text.

Category

Core Controls

Syntax

<xp:inputRichText attributes>content</xp:inputRichText>
Table 1. Essential properties
Property Description
id Defaults to inputRichText1, inputRichText2, and so on.
value Binds the control to a data element or other value.

Usage

At run time, an edit box with a tool bar appears on the page. The user can enter text with attributes such as boldface and italics. and insert tables, attachments, embedded objects, and other artifacts.

The CKEditor (http://ckeditor.com) is the default rich text editor for XPages. This editor permits the embedding of images, tables, links, and emoticons. The editor includes a spell checker.

You can adjust the toolbar that is rendered. With the rich text control in focus, click the Dojo tab and add an attribute (dojoAttributes property) named toolbarType with a value of lite, medium, or full.

You can revert to the Dojo rich text editor. With the rich text control in focus, click the Dojo tab and specify the Dojo type (dojoType property) as ibm.xsp.widget.layout.RichText.

Examples

This Rich Text control is bound to a field on a Domino® form.
<xp:inputRichText id="inputRichText1" value="#{document1.body}"></xp:inputRichText>
This Rich Text control uses the Dojo editor.
<xp:inputRichText id="inputRichText1"
	value="#{document1.body}" dojoType="ibm.xsp.widget.layout.RichText">
</xp:inputRichText>
This Rich Text control renders a full toolbar.
<xp:inputRichText id="inputRichText1" value="#{document1.body}">
	<xp:this.dojoAttributes>
		<xp:dojoAttribute name="toolbarType" value="full"></xp:dojoAttribute>
	</xp:this.dojoAttributes>
</xp:inputRichText>