You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to copy element text content or input values to the clipboard, without the leading dollar sign "$" but still keep it displayed in the README preview?
For example, in README.md, copying the first command copies the "$" in the beginning, i.e. $ npm install --save @github/clipboard-copy-element. However, that can cause some issues:
$ $ npm install --save @github/clipboard-copy-element-bash: $: command not found
One solution is to have the command not include the "$". But its inclusion is conventional for "run as non-root" as opposed to prepending the command with "#" which indicates running the command as root.
The text was updated successfully, but these errors were encountered:
I had a similar use case to exclude prompt characters (such as $). The way I solved this is to wrap those characters in a span with aria-hidden=true and exclude them from the copied text.
Is there a way to copy element text content or input values to the clipboard, without the leading dollar sign "$" but still keep it displayed in the README preview?
For example, in README.md, copying the first command copies the "$" in the beginning, i.e.
$ npm install --save @github/clipboard-copy-element
. However, that can cause some issues:One solution is to have the command not include the "$". But its inclusion is conventional for "run as non-root" as opposed to prepending the command with "#" which indicates running the command as root.
The text was updated successfully, but these errors were encountered: