Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs]: customize copy code button #406

Open
lukaspie opened this issue Aug 21, 2024 · 0 comments
Open

[Docs]: customize copy code button #406

lukaspie opened this issue Aug 21, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@lukaspie
Copy link
Collaborator

If we have something like

user@box:~$ dataconverter generate-template --nxdl NXmynxdl

in the docs, the "copy code" option will also copy "user@box". We should customize the codebox so only dataconverter generate-template --nxdl NXmynxdl gets copied.

There seems to be some solution along the lines of changing the extras.css file:

.codehilite .no-copy {
    user-select: none;       /* Prevents text selection */
    pointer-events: none;    /* Prevents interaction */
    color: #6a737d;          /* Optional: style the prefix to look like a prompt */
}
´``
and then using
```console
<span class="no-copy">user@box:~$</span> dataconverter generate-template --nxdl NXmynxdl

But this does not yet work out of the box.

@lukaspie lukaspie added the documentation Improvements or additions to documentation label Aug 21, 2024
@lukaspie lukaspie changed the title Docs: customize copy code button [Docs] customize copy code button Aug 23, 2024
@lukaspie lukaspie changed the title [Docs] customize copy code button [Docs]: customize copy code button Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant