Rich Text Editor
A rich text editor is a UI component that allows users to easily create and format text without having to write HTML, as it includes formatting options such as bold, italics, underlines, etc. Place it in your form where you have to provide users with a text input space that also needs text formatting options. Note: The text is stored as HTML when saved.
Text Properties
The rich text editor's formatting properties are as follows:
Text Formatting
Format | Description |
---|---|
(Un)OrderedList and Alignment
Listing & Alignment | Description |
---|---|
[Creates a non-numbered list] | |
[Creates a numbered list] | |
(Left / Center / Right / Justify) |
Colors and Links
Color & Link | Description |
---|---|
Font Style, Size, and Text Type
Type, Font & Size | Description |
---|---|
API Methods
setReadOnly
Sets the ReadOnly flag for this component.
- Method
- Usage
setReadOnly(readOnly: boolean): void
// Setting the readOnly to "true" renders the field as non-editable
a8forms.RichtextEditor("richtextEditorId").setReadOnly(true)
// Setting the readOnly to "false" enables the field to be editable
a8forms.RichtextEditor("richtextEditorId").setReadOnly(false)
setVisibility
Sets the Visibility flag for this component.
- Method
- Usage
setVisibility(visible: boolean): void
// Setting the visibility to "true" makes the element visible
a8forms.RichtextEditor("richtextEditorId").setVisibility(true)
// Setting the visibility to "false" makes the element invisible
a8forms.RichtextEditor("richtextEditorId").setVisibility(false)
setVisibilityCondition
Sets the visibility condition for this component.
- Method
- Usage
setVisibilityCondition(condition: string): void
// Sets a condition for changing the element's visibility status.
a8forms.RichtextEditor("richtextEditorId").setVisibilityCondition("1 === 1")