Skip to content

MacDown does not utilize the net.daringfireball.markdown UTType when copying data onto the pasteboard #1342

@jeremyhu

Description

@jeremyhu

If you copy out of MacDown's editor, the content is put onto the pasteboard as public.utf8-plain-text, eg:

Item 789514: public.utf8-plain-text: {length = 25, bytes = 0x23232320 48656164 65720a0a 54686973 ... 69732066 696e652e }

If you copy out of MacDown's preview, the content is put onto the pasteboard as rtf, html, et al:

Item 789514: com.apple.webarchive: {length = 1412, bytes = 0x62706c69 73743030 d101025f 100f5765 ... 00000000 0000054a }
Item 789514: public.rtf: {length = 496, bytes = 0x7b5c7274 66315c61 6e73695c 616e7369 ... 73206669 6e652e7d }
Item 789514: public.html: {length = 1146, bytes = 0x3c683320 69643d22 746f635f 30222073 ... 696e652e 3c2f703e }
Item 789514: public.utf8-plain-text: {length = 21, bytes = 0x4865616465720a0a546869732069732066696e652e}
Item 789514: com.apple.WebKit.custom-pasteboard-data: {length = 32, bytes = 0x01000000 07000000 0166696c 653a2f2f ... 00000000 00000000 }
Item 789514: public.utf16-external-plain-text: Promised

In both cases, MacDown should be placing content onto the pasteboard using the net.daringfireball.markdown UTI (encoded as UTF-8) as that is the official UTI for Markdown (cf: https://en.wikipedia.org/wiki/Markdown)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions