edix
Purpose: Edix is an experimental, framework-agnostic state manager for
contenteditableelements, designed to simplify rich text editing in modern web development. It addresses the inconsistencies and bugs of nativecontenteditablewhile maintaining a lightweight footprint (~4kB).Key Features:
- Fixes
contenteditableissues to work better with declarative frameworks. - Supports both single-line and multi-line editing modes.
- Provides a simple API for managing editable content state.
- Small size (~4kB) makes it suitable for lightweight use cases.
- Fixes
Target Audience: Developers who need a lightweight, customizable rich text editing solution without the complexity of full-fledged editors like ProseMirror or Lexical.
Framework Support: Works with React, Vue, Svelte, Solid, Angular, Preact, Qwik, and vanilla JS. Svelte support is included, with a dedicated demo and example source .
Core Workflow:
- Define content declaratively (following specific rules for
contenteditable). - Initialize the editor with
editable()on mount. - Update state via
onChangecallback. - Clean up with
dispose()on unmount.
- Define content declaratively (following specific rules for
Documentation: Detailed API reference and framework-specific examples available.
angularcontenteditableeditorhighlightinputpreactqwikreactsolidsveltetextareavueautocompletetagging
Author
Featured Stories
No featured articles.