Skip to content

infonomic/lexical-inline-image-plugin

Repository files navigation

lexical-inline-image-plugin

An example inline-image plugin for Lexical

screenshot of Lexical editor inline image plugin

Setup

npm install

npm run dev

Notes

This is a copy of the Lexical Playground project with quite a few nodes and plugins removed.

The InlineImagePlugin was based initially on the Playground ImagesPlugin - and then adapted accordingly.

The UI and modals for the InlineImage plugin are a bit of a hack (Checkbox and Select in particular) since the actual UI of the editor would likely be set in the admin interface of the host application.

The img src is base64 encoded (as in the Playground example). A 'real' implementation would add one or more sources from the host application, likely as part of a responsive image strategy.

Enjoy!

About

Lexical editor inline image plugin

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages