Hi!
The Copy button in code snippets is giving us problems. If you use it, it messes up the spaces or tabs or whatever you use. But if you just copy the code from the box, it works fine. So we want to remove the Copy button from all our code snippets. Anyone have a suggestion for doing this in a clever way? Other than just removing the <MadCap:codeSnippetCopyButton />
Thanks!
Kind regards,
Vibeke
Get rid of the Copy button in code snippets
Re: Get rid of the Copy button in code snippets
You can use CSS to hide the button:
Code: Select all
MadCap|codeSnippetCopyButton
{
display: none;
}
Re: Get rid of the Copy button in code snippets
Just to note that copying directly from a published code snippet can still cause problems: the leading spaces in indented lines of code are non-breaking spaces and may cause difficulties when working with the pasted code snippet.
Rae Streets (Flare user since 2017, now on Flare 2023; Central user from 2020)
Re: Get rid of the Copy button in code snippets
Thanks for the suggestion for doing it via CSS, great idea. Our previous tests showed that the code worked if you just copied it from the box without using the Copy button, so we will try and go ahead with this solutions.