Ability to Remove Clipboard for Code Snippets
See original GitHub issue- I’ve read the [contribution guidelines][1] and agree with them
I want to suggest an idea and checked that …
- … to my best knowledge, my idea wouldn’t break something for other users
- … the documentation does not mention anything about my idea
- … there are no open or closed issues that are related to my idea
Description
I would like the ability to remove the “copy to clipboard” functionality for specific code snippets on a case-by-base basis.
Use Cases
I like to show a command that the viewer should run followed by the expected output. I use code snippets for both of these purposes. However, an inattentive viewer might confuse the command for the expected output and try to copy and paste the output. I would like to prevent this by hiding the clipboard icon for expected output.
Screenshots / Mockups
The syntax can look something like this:
```<Optional language> no-copy
Error: ...
```
Issue Analytics
- State:
- Created 3 years ago
- Comments:31 (24 by maintainers)
Top Results From Across the Web
How to programmatically turn off the Clipboard warning ...
This article explains why this warning message occurs and how to prevent it by using a Microsoft Visual Basic for Applications macro. More...
Read more >Clipboard Manager - Visual Studio Marketplace
Keep a history of your copied and cut items and re-paste, without override the Ctrl+C and Ctrl+V keyboard shortcuts. To pick a copied...
Read more >Clear clipboard to prohibit unauthorised copying, insert ...
You cannot clear clipboard data since there is no function for that. Best way to remove it is to assign null values. ie...
Read more >How to Access Clipboard in Android (and Clear it)
The copy and paste functionality on Android smartphones might seem to be a "one-time" thing. Once you copy a snippet of text, you...
Read more >Code snippet - Carbon Design System
Code snippets by default have a copy functionality that allows users to copy the provided code to their clipboard. The copy icon must...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using the text lexer should work:
Let me be clear,
attr_list
supports the legacy behavior of using:
. I’m not sure where this legacy behavior comes from.fenced_code
never supported:
. Probably because:
is a legacy behavior. SuperFences, which is modeled afterfenced_code
, also does not support it.It happens to work if you use a space just because how
attr_list
handles the content, but that is not intentional behavior.Is this a little confusing? Yup.
In general, it is probably less confusing to just never use
:
withattr_list
, even if it is supported formally in some cases.