# "Copy Rich Text" command omits fenced code blocks

#### ioa

31 May, 2019 05:30 PM

Using the attached sample document, use the Edit ▸ Copy Rich Text command and then paste into TextEdit. All of the fenced block quote entries will be lost. It looks like code spans and indented code blocks work fine.

1. Support Staff Posted by Brett on 02 Jun, 2019 12:32 PM

For accurate testing, which themes have you tested with and do you have syntax highlighting on or off?

- Brett

2. Posted by ioa on 03 Jun, 2019 04:49 PM

I tested with default settings, so it looks like that would be "Swiss",
and yes to syntax highlighting, using the github.css file.

--
Ioa

3. Support Staff Posted by Brett on 04 Jun, 2019 05:27 PM

Thanks for reporting this. I've been doing some testing and there's some serious weirdness happening.

Regardless of the Syntax Highlighting setting, sometimes it copies the code blocks, sometimes it doesn't. I thought at first that when I removed the json specifier from the second code block it fixed it, but it soon returned to not copying 2nd and 3rd blocks. This is going to take some figuring out.

Marked's Copy RTF function is essentially the same as doing a ⌘A, ⌘C to copy the web contents. Doing that, though, seems to consistently work with the code blocks (and is a good workaround for you while I track this down). I just need to figure out why those code blocks would be ignored by the copy command...

Thanks,
Brett

4. Support Staff Posted by Brett on 04 Jun, 2019 05:50 PM

Ah, I found it. Stupid mistake on my part, fixed for the next update (to be released soon).

5. Brett closed this discussion on 04 Jun, 2019 05:50 PM.

Comments are currently closed for this discussion. You can start a new one.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 01 Mar, 2021 02:00 PM Rendering Mermaid 01 Mar, 2021 01:56 PM Source Line Numbers 26 Feb, 2021 02:24 PM *manual* refresh needed when using mathjax from script 24 Feb, 2021 06:25 AM pdflatex not found 23 Feb, 2021 06:39 PM streaming preview beachballs when URL is supplied

## Recent Articles

 Intra-document links in exported PDFs Using Ulysses with Marked Fenced code blocks inside indented code blocks Using JavaScript in Marked Custom CSS: Writing custom CSS for Marked