How to insert a codeblock to copy?

Hi Justin,

We installed the latest Discourse version 2.7.0.Beta2, and enable the ‘Add a button to codeblocks to copy the block contents to the users’s clipboard. This feature is not supported on Internet Explorer.’ from ‘Settings’ → ’ Posting’.

How can we post the codes that have the copy button?

Example, how can I add below code has the copy button?

This is my code, and want to show the copy button.

1 Like

Use the insert code button in the composer:

image

a = [1..10].shuffle
4 Likes

Great.
Finally, I got it. I spent 2 hours google and search the meta.discourse.org. Saved a lot time.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.