Ready for Dev, so its markup, attributes, events and styles can all still change without notice,
it is not covered by the accessibility gate, and it is not published to npm. It is on this site so the work
can be seen and reviewed - nothing more.
Editor
A rich text / content editor component.
Usage
Edit me...
Edit me...
<section is="root-editor" aria-label="Content editor">
<div contenteditable>Edit me...</div>
</section>
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
value |
string |
- | Editor content (HTML) |
placeholder |
string |
- | Placeholder text |
disabled |
boolean |
false |
Disables editing |
aria-label |
string |
- | Accessible label |
Events
| Event | Detail | Description |
|---|---|---|
root-editor.input |
{ value } |
Fired on content change |
root-editor.focus |
{ value } |
Fired on focus |
root-editor.blur |
{ value } |
Fired on blur |
root-editor.change |
{ html } |
Fired when the content changes |
Extends
HTMLElement - use with <section is="root-editor">.