Code blocks and Copy to Clipboard questions #2522
Unanswered
ciaranevans
asked this question in
Q&A
Replies: 2 comments 10 replies
-
Are you using a specific theme? I don't think the default MkDocs theme offers "copy to clipboard" functionality. |
Beta Was this translation helpful? Give feedback.
6 replies
-
Relying on syntax highlighting by Pygments, you can make the prompts not selectable by adding custom CSS as such: .highlight .gp { /* Generic.Prompt */
user-select: none;
} You can see this in action at And apparently that also affects the "copy to clipboard" button, at least in Firefox for me. Similar might be possible with highlightjs. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks 👋
Not issues as such, I'm just not sure where best to ask these kind of questions!
For a code block (```) - is there a way to specify content not to copy within the block? I.E virtual env names at the start of a terminal output (
(venv) $ <the command>
) - I only want to copy `the command`For a code block (```) - is there a way to completely disable
Copy to Clipboard
? - For outputs of commands like `--help`, it doesn't seem useful to be able to copy thisMany thanks! Apologies if this isn't the place!
Beta Was this translation helpful? Give feedback.
All reactions