Skip to content

Conversation

@sorokya
Copy link

@sorokya sorokya commented Dec 26, 2025

Fixes #27

Not sure if the web-component code also needs updated?

I added a demo for the new code. There's no styling for drag-over but it works.


Summary by cubic

Adds file upload support with paste and drag‑and‑drop, including optional batch uploads and placeholder handling. Updates docs, types, and demo; bumps to v2.2.0.

  • New Features
    • Paste or drag-and-drop files into the editor; a placeholder is inserted and replaced after async upload.
    • New fileUpload options: enabled, maxSize (default 10 MB), mimeTypes filter, batch mode.
    • onInsertFile callback accepts File or File[] and returns markdown string(s) to insert.
    • Images are auto-detected and use the syntax; failures replace placeholders with Upload failed.
    • TypeScript defs, README examples, and a website demo with a batch toggle are included.

Written for commit d22ef60. Summary will update automatically on new commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: File/image paste and drop support

1 participant