RichTextEditor
Basic rich text editor with formatting toolbar
.
.
.
Accessibility
- Pair the control with a visible label or aria-label and keep helper or error text programmatically associated.
- Preserve expected keyboard entry, selection, and state announcements for the chosen input pattern.
- Label editor toolbars and popovers explicitly, and ensure formatting actions remain keyboard-complete.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
svelte
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { RichTextEditor } from '@dryui/ui';
</script>
<RichTextEditor.Root>
<RichTextEditor.Toolbar>...</RichTextEditor.Toolbar>
<RichTextEditor.Content>...</RichTextEditor.Content>
</RichTextEditor.Root> Import options
Root package
ts
import { RichTextEditor } from '@dryui/ui' Per-component subpath
ts
import { RichTextEditor } from '@dryui/ui/rich-text-editor' API
Props, CSS variables, and the public data attributes you can target when styling.
| Prop | Type | Description | Default | Required | Bindable |
|---|---|---|---|---|---|
RichTextEditor.Root | |||||
| value | string | Current controlled or bindable value. | '' | — | ✓ |
| placeholder | string | Hint text shown when no value is selected or entered. | '' | — | — |
| readonly | boolean | — | — | — | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |
RichTextEditor.Toolbar | |||||
| children | Snippet<[ToolbarSnippetParams]> | Content rendered inside the component. | — | ✓ | — |
RichTextEditor.Content | |||||