question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:31 (24 by maintainers)

github_iconTop GitHub Comments

2reactions
squidfunkcommented, Mar 11, 2021

Using the text lexer should work:

``` { .text .no-copy }
...
```
1reaction
facelessusercommented, Mar 13, 2021

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 after fenced_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 : with attr_list, even if it is supported formally in some cases.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found