> For the complete documentation index, see [llms.txt](https://enhancio.gitbook.io/tinymce-rich-text-editor-for-bubble/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enhancio.gitbook.io/tinymce-rich-text-editor-for-bubble/element-reference/states.md).

# States

## Summary

### Element states

| Name                                                      | Type     | Summary                                                                                                                                                                                                                                                 |
| --------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [html content](#html-content)                             | `text`   | Current editor contents as HTML.                                                                                                                                                                                                                        |
| [text content](#text-content)                             | `text`   | Current editor contents as plain text.                                                                                                                                                                                                                  |
| [selected html](#selected-html)                           | `text`   | Currently selected contents as HTML. For this to work, element field 'Enable text selection trigger' needs to be enabled.                                                                                                                               |
| [selected text](#selected-text)                           | `text`   | Currently selected contents as plain text. For this to work, element field 'Enable text selection trigger' needs to be enabled.                                                                                                                         |
| [is focused](#is-focused)                                 | `yes/no` | Whether the editor content element has focus, such as when clicking inside the editor content.                                                                                                                                                          |
| [is dirty](#is-dirty)                                     | `yes/no` | Whether the editor is dirty or not. It will get dirty if the user has made modifications to the contents. It will get not dirty when the 'html/text content' state is updated, autobinding value is published and 'content changed' event is triggered. |
| [word count](#word-count)                                 | `number` | Current number of words in the editor content.                                                                                                                                                                                                          |
| [character count](#character-count)                       | `number` | Current number of characters in the editor content, including spaces.                                                                                                                                                                                   |
| [character count (no spaces)](#character-count-no-spaces) | `number` | Current number of characters in the editor content, excluding spaces.                                                                                                                                                                                   |

***

## Element states

### html content

**Type:** `text`

Current editor contents as HTML.

***

### text content

**Type:** `text`

Current editor contents as plain text.

***

### selected html

**Type:** `text`

Currently selected contents as HTML. For this to work, element field 'Enable text selection trigger' needs to be enabled.

***

### selected text

**Type:** `text`

Currently selected contents as plain text. For this to work, element field 'Enable text selection trigger' needs to be enabled.

***

### is focused

**Type:** `yes/no`

Whether the editor content element has focus, such as when clicking inside the editor content.

***

### is dirty

**Type:** `yes/no`

Whether the editor is dirty or not. It will get dirty if the user has made modifications to the contents. It will get not dirty when the 'html/text content' state is updated, autobinding value is published and 'content changed' event is triggered.

***

### word count

**Type:** `number`

Current number of words in the editor content.

***

### character count

**Type:** `number`

Current number of characters in the editor content, including spaces.

***

### character count (no spaces)

**Type:** `number`

Current number of characters in the editor content, excluding spaces.

***
