Skip to content

Intercept copy actions in Quick Look preview#131

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Jun 8, 2026
Merged

Intercept copy actions in Quick Look preview#131
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Quick Look (lite host) preview so that copy actions (Cmd-C) target the rendered markdown overlay instead of the underlying source editor, aligning copy behavior with what the user sees in “preview” mode.

Changes:

  • Added a new Quick Look interaction hook to intercept copy events while the preview overlay is active.
  • Wired the new copy interception into the Quick Look UI setup.
  • Updated the lite dist bundle to include the new behavior.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/quicklook/ui.ts Wires the new preview copy interception into Quick Look setup.
src/quicklook/interaction.ts Adds interceptPreviewCopy() capture-phase handler to populate clipboard with preview HTML/text.
dist/lite/markedit-preview.js Rebuilt lite bundle to include the new Quick Look copy interception logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/quicklook/interaction.ts
Comment thread src/quicklook/interaction.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.

Comment thread src/quicklook/interaction.ts
Comment thread tests/quicklook.interaction.test.ts
@cyanzhong cyanzhong merged commit 5d757f6 into main Jun 8, 2026
2 checks passed
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.

2 participants