Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

feat: drag-and-drop .md/.txt/.html files to sidebar creates new documents#1683

Open
mrzhangkris wants to merge 1 commit into
BoostIO:masterfrom
mrzhangkris:feature/drag-drop-file-to-create-doc
Open

feat: drag-and-drop .md/.txt/.html files to sidebar creates new documents#1683
mrzhangkris wants to merge 1 commit into
BoostIO:masterfrom
mrzhangkris:feature/drag-drop-file-to-create-doc

Conversation

@mrzhangkris
Copy link
Copy Markdown

Summary

Allow users to drag and drop .md, .txt, or .html files directly onto a workspace in the sidebar to create new documents with the file content as the initial content.

Changes

  • useCloudDnd.ts: Added dropFilesInWorkspace callback that reads dropped files and calls createDoc for each supported file type
  • useCloudDnd.ts: Modified dropInWorkspace to detect file drops vs internal resource drags and route accordingly
  • useCloudSidebarTree.tsx: Updated workspace onDrop handler to check for files first and route to dropFilesInWorkspace

Supported file types

  • .md (Markdown)
  • .txt (Plain text)
  • .html (HTML)

Closes

Fixes #1151


This PR is for IssueHunt bounty: https://oss.issuehunt.io/r/BoostIO/BoostNote-App/issues/1151

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 11, 2026

CLA assistant check
All committers have signed the CLA.

- Added dropFilesInWorkspace handler to useCloudDnd hook
- Modified dropInWorkspace to detect file drops vs resource drops
- Workspace onDrop handler now routes files to dropFilesInWorkspace
- createDoc receives file content as initial doc body (for .md/.txt/.html)
- Closes BoostIO#1151 (IssueHunt  bounty)
@mrzhangkris mrzhangkris force-pushed the feature/drag-drop-file-to-create-doc branch from cc136e5 to 6bc4a43 Compare May 11, 2026 14:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a document by drag and drop with a text file(.md, .txt and .html)

2 participants