Rich text component

Updated at:

Introduction

The rich text component is used to enter, edit, and format text. It provides a rich content creation experience by supporting various formats and styles, such as fonts, colors, links, and images.

Configuration items

Category

Configuration

Example

Description

Content

Content

The content of the rich text component.

Booth Content

The placeholder text that appears when the component is empty.

Label

For more information, see Common form properties.

Interaction

Hide

Controls the default display state of the component. If set to true, the component is hidden. For more information, see Common properties.

Read-only

Makes the component read-only. Users cannot edit the content.

Convert to markdown format

If enabled, automatically converts the rich text content to Markdown format and stores it in `markdownContent`.

Validation

For more information, see Common form properties.

Style

Height

For more information, see Common properties.

Margin

For more information, see Common properties.

Hide toolbar

Hides the component's toolbar.

Max height

The maximum height of the component, excluding the label.

Min height

The minimum height of the component, excluding the label.

Properties and methods

Name

Type

Example

Description

value

string

richTextEditor1.value

The content of the rich text component.

markdownContent

string

richTextEditor1.markdownContent

Read-only. The content of the component in Markdown format. This requires the Convert to markdown format configuration to be enabled.

readOnly

String

richTextEditor1.readOnly

Indicates if the component is in a read-only state.

validationStatus

boolean

richTextEditor1.validationStatus

The validation status of the component.

validationMessage

string

richTextEditor1.validationMessage

The validation message of the component.

hidden

boolean

richTextEditor1.hidden

Indicates if the component is hidden. For more information, see Common properties.

setValue

func

richTextEditor1.setValue('text')

Sets the content of the rich text component to text.

clearValue

func

richTextEditor1.clearValue()

Clears the content of the rich text component.

setReadOnly

func

richTextEditor1.setReadOnly(true)

Sets the read-only state of the component. The parameter can be true or false.

clearReadOnly

func

richTextEditor1.clearReadOnly()

Clears the read-only state of the component.

setHidden

func

richTextEditor1.setHidden(false)

Sets whether the component is hidden. The parameter can be true or false. For more information, see Common properties.

clearHidden

func

richTextEditor1.clearHidden()

Clears the hidden state of the component. For more information, see Common properties.

Event callbacks

Configuration

Description

The event that is triggered when the component's content changes.