0.1.4 • Published 2 years ago

lexical-rte v0.1.4

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Lexical rte

It is a lexical based rich text editor

Todo

  • Add editor
  • Add docs
  • Publish to npm
  • Add KaTex support with annotation
  • Add Types

Install

npm install --save lexical-rte

Example

import { Editor } from "lexical-rte";

function App() {
  const [currentValue, setCurrentValue] = useState("");
  return (
    <div className="md:container mx-auto my-5">
      <h1>Rich text editor</h1>
      <Editor
        onInit={(editor) => {
          console.log(editor);
        }}
        onSave={(editorState) => {
          console.log(editorState);
        }}
        value={currentValue}
        onChange={(editorState) => {
          console.log(editorState);
        }}
      />
    </div>
  );
}