Preserve text formatting (RTF/HTML) when pasting older clippings#4
Open
MiMoHo wants to merge 1 commit into
Open
Preserve text formatting (RTF/HTML) when pasting older clippings#4MiMoHo wants to merge 1 commit into
MiMoHo wants to merge 1 commit into
Conversation
Flycut previously stored and pasted plain text only, so pasting any clipping through the bezel, menu, or search window stripped all formatting. Capture now also reads the RTF and HTML representations of text clippings (after the concealed/transient skip checks, capped at 1 MB per type) and stores them alongside the plain text. Pasting declares the rich types in addition to the plain string, so rich text editors keep bold, fonts, links, and colors while plain-text targets are unaffected. Rich data persists through the existing NSUserDefaults store and can be disabled with the new preserveTextFormatting default (documented in help.md). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Flycut has always stored and pasted plain text only — pasting any clipping through the bezel, menu, or search window strips all formatting. This adds formatting preservation:
Design / privacy considerations
shouldSkip:checks pass, so concealed/transient clippings (password managers) never have their rich representations readpreserveTextFormattingdefault (ON), documented in help.md, opt-out viadefaults write com.generalarcade.flycut preserveTextFormatting -bool NO— happy to wire a preferences checkbox if you'd like one in the panelTesting
All changed files pass
clang -fsyntax-onlyagainst the macOS SDK with no new diagnostics versus master. I could not run a fullxcodebuildlocally (no full Xcode on this machine), so please give it a CI build/manual smoke test: copy styled text from e.g. Safari or TextEdit, copy something else, then paste the older clipping into TextEdit (formatting kept) and into a terminal (plain text as before).🤖 Generated with Claude Code