Copying Code-Fenced Text

Hi,

Could code fencing be enhanced to provide a Copy to Clipboard feature, currently, a CTRL+A selects all of the text in the whole window, not just the text in the fenced area when it’s focused.

Perhaps something like this in the bottom right and corner?

image

3 Likes

The “copy to clipboard” function has been added to the Discourse core a long time ago. There is no need to install a plugin for it.

In your site settings search for show copy button on codeblocks .

3 Likes

Hi Daniela,

Oh, I did not know that and I am feeling a bit silly now ;]. Thank you for making me aware of that, it works like a charm.

With kind regards,
Andreas.

1 Like