NabuEditor
Component Stability: stable
- Any other attribute (
id,class,style,aria-describedby,inputmode,enterkeyhint,autocapitalize,data-*...) goes to the root element, andclassis added tonabu-editor. The editor's own attributes and handlers come after them and always win:contenteditable,role,spellcheck,lang,translate,aria-label,aria-labelledby,data-nabu-*and everyon*handler cannot be overridden (uselabel/labelledby,readonly, and the engine options). Events bubble: listen to them on a parent element of the editor.
Related guide: Your first editor →
Usage
Svelte
<script>
import { NabuEditor } from '@aionbuilders/nabu';
</script>
<NabuEditor />Props
| Prop | Type | Default | Description |
|---|---|---|---|
engineoptional | Nabu | new Nabu() | The editor this component works on (a |
labeloptional | string | n/a | the accessible name of the editor ( |
labelledbyoptional | string | n/a | the id of the element that names it ( |
readonlyoptional | boolean } & HTMLAttributes<HTMLDivElement | n/a | show the document without letting anyone edit it. Reactive (toggle it live). When omitted, the editor follows |
Source: src/lib/blocks/Nabu.svelte