Skip to content

Lexical

Lexical is a JavaScript toolkit for building a writing editor inside your app.

Visit Lexical

When does it make sense to build on Lexical?

Choose Lexical when you need control over the editing experience, such as deciding how a note handles a special callout. The core works without a specific web framework and Lexical supplies React bindings if your app uses React. Choose the editing features and put the toolbar your users need around them.

What do you save so someone can edit the note again?

Save the editor state as JSON, a structured representation of the content, in storage your app controls. Keep the document types and conversion rules your app uses alongside the code. For instance, if you add a custom callout, keep the code that recognizes and opens it.

Will a copy look the same in another editor?

That depends on what both editors can read. Lexical documents HTML and Markdown conversion, with supported features and converters shaping the result. Keep the original JSON, convert a copy and check which details make it across. Lexical’s MIT-licensed code is available without a library subscription. Your project still owns the interface, storage and maintenance work.

How would you check that a custom note can move?

Sketch a fictional lesson note with a bold phrase and a custom “Try this” callout. Make a checklist before adding an export option to your app.

  1. Define what must reopen
    Mark the callout text, its label and the bold phrase as items that need to survive an edit and reload.
  2. Define what another app should see
    If the destination cannot display your custom callout, decide whether keeping its label and text as an ordinary paragraph is useful. Preserve the original for future edits.