@lilac-wysiwyg/preact
v0.7.1
Published
Preact adapter for Lilac WYSIWYG editor - lightweight React-compatible component wrapper
Maintainers
Readme
@lilac-wysiwyg/preact
Lightweight, React-compatible Preact component wrapper for the Lilac WYSIWYG editor.
Part of Lilac — a smooth, modern, framework-agnostic WYSIWYG editor with a TypeScript core.
Installation
npm install @lilac-wysiwyg/preactRequires Preact >= 10 (declared as a peer dependency, so the copy already in your app is used).
Usage
import { useState } from 'preact/hooks';
import { LilacEditor } from '@lilac-wysiwyg/preact';
function App() {
const [content, setContent] = useState('<p>Hello Preact!</p>');
return <LilacEditor value={content} onChange={setContent} toolbar />;
}Documentation
Full documentation and examples: https://maifeeulasad.github.io/lilac/preact.html
The API reference for the underlying editor lives in the main README.
License
MIT © Maifee Ul Asad
