Skip to content

[mac] Open dropped and batch-opened markdown files in tabs - #408

Merged
Shpigford merged 2 commits into
mainfrom
issue-384
Aug 23, 2026
Merged

Shpigford merged 2 commits into
mainfrom
issue-384

Conversation

@Shpigford

Copy link
Copy Markdown
Owner

Dropping one or more markdown files onto a Clearly window (editor or preview) now opens them as native window tabs instead of inserting the file path as text. A single file dropped on an untitled, unedited document replaces it, while multiple files leave the empty tab alone and just add tabs, matching browser/editor convention. Finder "Open with" and Dock drops of multiple files also land as tabs on the frontmost document window, via a kAEOpenDocuments Apple Event handler since SwiftUI's DocumentGroup bypasses the delegate's application(_:open:). Non-markdown drops keep their existing behavior.

Fixes #384

- Dropping markdown files on the editor or preview opens them as native
  window tabs instead of inserting the file path as text.
- A single file dropped on an untitled, unedited document replaces it;
  multiple files leave it alone and just add tabs.
- Finder "Open with" / Dock drops of multiple files land as tabs on the
  frontmost document window via a kAEOpenDocuments Apple Event handler
  (SwiftUI's DocumentGroup bypasses the delegate's application(_:open:)).
Only replace the empty untitled document when a dropped file actually
opened, and let a batch fall through to the next URL when the first
one fails to open.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying clearly with  Cloudflare Pages  Cloudflare Pages

Latest commit: 55f2c41
Status: ✅  Deploy successful!
Preview URL: https://4e11cb94.clearly-cjz.pages.dev
Branch Preview URL: https://issue-384.clearly-cjz.pages.dev

View logs

@Shpigford
Shpigford merged commit 0d7f624 into main Aug 23, 2026
3 checks passed
@Shpigford
Shpigford deleted the issue-384 branch August 23, 2026 20:49
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.

Support drag-n-drop of one or more files

1 participant