Docs / Components
SenseEditorComponent
Lightweight contenteditable rich-text control from @artificialsenselabs/ui โ formatting toolbar, allowlist HTML sanitization, and forms ControlValueAccessor. Not a full document editor (TipTap / Quill / ProseMirror).
Live demo: run nx serve showcase and open /components/editor (port 4202).
Overview
Category: Form. Selector: sense-editor. Import: import { SenseEditorComponent } from '@artificialsenselabs/ui';
Formatting uses the browser document.execCommand API. Prefer this for short rich notes; choose a dedicated editor library for collaborative docs, custom schemas, or complex paste pipelines.
Accessibility
- Editable region uses
role="textbox"with localizedaria-label. - Toolbar exposes
role="toolbar"with toggle buttons usingaria-pressed. - User HTML is sanitized to an allowlist โ scripts, event handlers, and dangerous URL schemes are removed.