Conversation
Override writeSelectionToPasteboard:types: in MPEditorView to include net.daringfireball.markdown UTType alongside plain text when copying or cutting content. This improves interoperability with Markdown-aware applications that can detect and handle markdown content specially. Related to #196
Address code review feedback: - Add writablePasteboardTypes override to advertise markdown UTType - Respect the types: parameter in writeSelectionToPasteboard:types: - Only write types that are actually requested - Fix documentation typo (Overriden -> Overridden) Related to #196
Contributor
Code Coverage ReportCurrent Coverage: 42.55% Coverage Details (Summary) |
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
When copying content from the editor, MacDown now places
net.daringfireball.markdownon the pasteboard alongsidepublic.utf8-plain-text. This improves interoperability with Markdown-aware applications that can identify and handle markdown content specially.Changes:
writablePasteboardTypesto advertise markdown UTType supportwriteSelectionToPasteboard:types:to write both plain text and markdown types when requestedRelated Issue
Related to #196
Manual Testing Plan
Key Test Scenarios
Success Criteria
net.daringfireball.markdownUTType is available for Markdown-aware applicationsReview Notes
writablePasteboardTypesandwriteSelectionToPasteboard:types:in MPEditorViewtypes:parameter per NSTextView API contract