@jaceyi/lexical-editor
v1.0.1
Published
A React rich text editor based on Lexical, supporting HTML and JSON modes with extensible plugins.
Readme
Lexical Editor
A React rich text editor built on Lexical, ready to use out of the box.
- Basic rich text: bold, italic, underline, headings, quotes, lists
- Common styling: color, font size, font family, alignment
- Extensions: links, image/file upload, @mentions, keyword highlighting
- Dual data modes:
htmlstrings and structuredjsondata
Docs
Install
npm install @jaceyi/lexical-editorExample
import Editor, { useHTMLHandle } from '@jaceyi/lexical-editor';
import '@jaceyi/lexical-editor/style.css';
const App = () => {
const [{ value }, editorProps] = useHTMLHandle({
initialValue: '<p>Hello Lexical Editor</p>',
});
return (
<>
<Editor namespace="basic-demo" {...editorProps} />
<pre>{value}</pre>
</>
);
};
export default App;