Skip to main content

Text Editor

The Text Editor component is used to enter and edit text in HTML format. It is recommended for blog posts, forum posts, or notes sections. The entered text is used as the label for the radio button.

Properties​

PropertyDescriptionExpected Value
PlaceholderA hint displayed to guide the user on what to enter.String (e.g., John Doe)
HTML(e.g., <h1>John Doe</h1>)
Default ValueThe default value that the component will hold when the app is loaded.String (e.g., Default Text)
HTML (e,g., <p>Hello, ToolJet!</p>).

HTML Support​

The Placeholder and Default Value property also supports HTML content allowing the use of headings, paragraphs, bold text, and other HTML elements within the text editor.

Component Specific Actions (CSA)​

Following actions of Button component can be controlled using the component specific actions(CSA):

Action
Description
How To Access
setValue()Sets the value of the text editor.Employ a RunJS query (for e.g.,
await components.richtexteditor1.setValue(<p> Hello ToolJet! </p>)) or trigger it using an event.
setVisibility()Sets the visibility of the component.Employ a RunJS query (for e.g.,
await components.richtexteditor1.setVisibility(false)) or trigger it using an event.
setLoading()Sets the loading state of the component.Employ a RunJS query (for e.g.,
await components.richtexteditor1.setLoading(true)) or trigger it using an event.
setDisable()Disables the component.Employ a RunJS query (for e.g.,
await components.richtexteditor1.setDisable(true)) or trigger it using an event.

Exposed Variables​

VariableDescriptionHow To Access
valueHolds the value entered by the user in the component.Accessible dynamically with JS (for e.g.,{{components.richtexteditor1.value}}).
isLoadingIndicates if the component is loading.Accessible dynamically with JS (e.g., {{components.richtexteditor1.isLoading}}).
isVisibleIndicates if the component is visible.Accessible dynamically with JS (e.g., {{components.richtexteditor1.isVisible}}).
isDisabledIndicates if the component is disabled.Accessible dynamically with JS (e.g., {{components.richtexteditor1.isDisabled}}).

Additional Actions​

Action
Description
Configuration Options
Loading stateEnables a loading spinner, often used with isLoading to indicate progress. Toggle or set dynamically.Enable/disable the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.

General​

Tooltip​

A tooltip provides additional information when the user hovers over the component. Under the General settings, you can set the tooltip text in string format. Hovering over the component will display the string as the tooltip.

Devices​

PropertyDescriptionExpected Value
Show on desktopMakes the component visible in desktop view.You can set it using the toggle button or dynamically configure the value by clicking on fx and entering a logical expression
Show on mobileMakes the component visible in mobile view.You can set it using the toggle button or dynamically configure the value by clicking on fx and entering a logical expression

Styles​

PropertyDescriptionConfiguration Options
VisibilityControls component visibility. Toggle or set dynamically.Enable/disable the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.
DisableEnables or disables the component. Toggle or set dynamically.Enable/disable the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.
Box-shadowSets the box shadow properties of the component.Select the box shadow color and adjust the related properties or programmatically set it using fx.