lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Feature: File upload

Open HolyOne opened this issue 4 months ago • 1 comments

I checked out the playground page and I did not see a file upload. However I can upload an image when dragged to the lexical editor.

Is there a way i can control that upload behaviour? Like speciying a custom dialog or webapi for it? Thanks

HolyOne avatar Apr 13 '24 18:04 HolyOne

There's no magic here, really. If you want to upload with a dialog, just make a button that triggers a dialog. When the upload is complete (or whenever, as your needs require) insert a Lexical node that renders an HTML img tag or something to have the image show up in the editor.

Lexical doesn't provide this out of the box, but we can leave this open as a feature request to support this better.

acywatson avatar Apr 17 '24 19:04 acywatson