Skip to content

feat: show clipboard toast on cut operations#64

Merged
j4rviscmd merged 1 commit intomainfrom
feat/cut-toast
Mar 26, 2026
Merged

feat: show clipboard toast on cut operations#64
j4rviscmd merged 1 commit intomainfrom
feat/cut-toast

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Show "Copied to clipboard" toast when user cuts content (Cmd/Ctrl+X) in the editor, matching existing copy behavior
  • Use capture phase for the cut listener to check selection state before ProseMirror removes content from the DOM

Test plan

  • Select text and press Cmd+X → toast "Copied to clipboard" appears
  • Select text and press Cmd+C → toast still appears (unchanged)
  • Press Cmd+X with no selection → no toast appears

🤖 Generated with Claude Code

The `cut` event listener now triggers the same "Copied to clipboard"
toast as `copy`. Uses the capture phase to check selection state
before ProseMirror removes content from the DOM.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@j4rviscmd j4rviscmd added the enhancement New feature or request label Mar 26, 2026
@j4rviscmd j4rviscmd merged commit 6af1e80 into main Mar 26, 2026
2 checks passed
@j4rviscmd j4rviscmd deleted the feat/cut-toast branch March 26, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant