- Free
- Lite
- Full
Free is on public npm, with no key. It has the Adjust tools, and a small “embededitor.com” badge in the corner of the menu.Without a bundler, serve the package’s Calling
Install
dist folder as it is. The entries load their chunks from beside them.In a React app, use the React entry instead. The standalone entry works there too, but your app then ships a second React.
Render
index.html
mountEditor adds a host element inside the element you pass and mounts the editor there. An element holds one editor: mounting again takes over the first one. Give the element a height.With a bundler, import from @embededitor/free/standalone instead.Update Props
mountEditor returns { update, destroy }. update(options) takes the full options again, like new React props, not a patch.main.js
src and state are read when the editor opens. Once an image is on screen, destroy the editor and mount it again to open another one.Clean Up
main.js
update after destroy throws.Next Steps
Inline and Page
Show the editor in a box or over the whole viewport.
mountEditor
The full signature.