# Rich Text Editor

## Overview

The Rich Text Editor component allows you to type and format text just like in a small online editor. You can add links, videos, or images, change colors, and adjust the layout using a toolbar. It’s useful anywhere you need more than plain text, for example, writing notes, descriptions, or messages.

<figure><img src="/files/WQmQpY0KL5pHmekyGiCp" alt=""><figcaption></figcaption></figure>

### Properties

<table><thead><tr><th width="137.85546875">Name</th><th width="134.546875">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>Component name</td></tr><tr><td><code>value</code></td><td><code>string</code></td><td>Current component value</td></tr><tr><td><code>contents</code></td><td><code>object</code></td><td>Quill <code>getContents()</code> output (Delta object)</td></tr><tr><td><code>readonly</code></td><td><code>boolean</code></td><td>Indicates if the component is in the read-only mode</td></tr><tr><td><code>quill</code></td><td><code>object</code></td><td><p>Quill instance. Contains all Quill prototype methods. </p><p>See more in <a href="https://quilljs.com/docs/api/">Quill docs</a>.</p></td></tr><tr><td><code>valid</code></td><td><code>boolean</code></td><td>Indicates if the component is valid</td></tr><tr><td><code>validating</code></td><td><code>boolean</code></td><td>Indicates if the component is validating</td></tr></tbody></table>

### Methods

<table><thead><tr><th width="155.40234375">Name</th><th width="173.0703125">Parameters</th><th width="98.82421875">Returns</th><th>Description</th></tr></thead><tbody><tr><td><code>setValue</code></td><td><p><code>value: string |</code></p><p> <code>Quill.Delta</code></p></td><td><code>void</code></td><td>Set component value</td></tr><tr><td><code>setReadonly</code></td><td><code>readOnly: boolean</code></td><td><code>void</code></td><td>Enable or disable read-only mode</td></tr><tr><td><code>reset</code></td><td>–</td><td><code>void</code></td><td>Reset component to the initial value</td></tr><tr><td><code>focus</code></td><td>–</td><td><code>void</code></td><td>Set focus on the component</td></tr><tr><td><code>validate</code></td><td>–</td><td><code>void</code></td><td>Trigger component validation</td></tr><tr><td><code>resetValidation</code></td><td>–</td><td><code>void</code></td><td>Clear validation errors</td></tr><tr><td><code>setErrors</code></td><td><p><code>errors: string |</code>   </p><p><code>string[] | null</code></p></td><td><code>void</code></td><td>Mark the component as invalid and display errors</td></tr><tr><td><code>setRequired</code></td><td><code>required: boolean</code></td><td><code>void</code></td><td>Mark the component as required or optional</td></tr></tbody></table>

### Triggers

<table><thead><tr><th width="140.96875">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>On Change</strong></td><td>Triggered when the component's state changes</td></tr><tr><td><strong>On Quill Event</strong></td><td>Triggered when the underlying Quill instance fires a change event</td></tr><tr><td><strong>On Enter</strong></td><td>Triggered when the Enter key is pressed</td></tr><tr><td><strong>On Focus</strong></td><td>Triggered when the component is in focus</td></tr><tr><td><strong>On Blur</strong></td><td>Triggered when the component loses focus</td></tr><tr><td><strong>On Init</strong></td><td>Triggered when the component is initialized</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uibakery.io/reference/working-with-components/rich-text-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
