Rich Text
WYSIWYG rich-text editor with a formatting toolbar (bold, italic, underline, headings, lists, link, blockquote, code) and a contenteditable region.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
placeholder | string | — | Placeholder text shown when the editor is empty. |
value | string | — | Initial HTML content for the editable area. |
disabled | boolean | — | Blocks editing and disables all toolbar buttons. |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/rich-text.js"></script> import "./pura/lib/rich-text.js";