From edde2975041b65121dbff87962cbde1bfa30f2c5 Mon Sep 17 00:00:00 2001 From: aenuros <37673253+aenuros@users.noreply.github.com> Date: Wed, 24 Oct 2018 01:52:55 -0400 Subject: [PATCH] docs: how to add "Copy" button to code blocks (#1047) * Update guides-custom-pages.md Guide on how to add "Copy" to clipboard buttons on code blocks in Docusaurus. * Update guides-custom-pages.md Changed wall of text to be a link to a gist describing the code you need to add to add copy clipboard * Add to markdown instead * Update guides-custom-pages.md --- docs/api-doc-markdown.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/api-doc-markdown.md b/docs/api-doc-markdown.md index a1a10e91b7..8281d0a004 100644 --- a/docs/api-doc-markdown.md +++ b/docs/api-doc-markdown.md @@ -206,3 +206,7 @@ class Example extends React.Component { } } ``` + +### Adding Copy Code Buttons + +Docusaurus allows for adding buttons to copy code within fenced code blocks. Please follow the instructions [here](https://gist.github.com/yangshun/55db997ed0f8f4e6527571fc3bee4675) to add "Copy" buttons to your code blocks.