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