mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Documentation
This commit is contained in:
parent
b4392964b1
commit
ee0a3c6ed2
@ -81,40 +81,6 @@ theme:
|
||||
```
|
||||
````
|
||||
|
||||
??? tip "Overriding the clipboard text"
|
||||
|
||||
<!-- md:version 9.4.4 -->
|
||||
<!-- md:flag experimental -->
|
||||
|
||||
If you want to define a slightly different text to be copied to the
|
||||
clipboard, you can use the `data-copy` attribute on the code block. Note
|
||||
that this attribute does not support multiple lines, which is not a
|
||||
limitation of Material for MkDocs, but of the Markdown parser. Example:
|
||||
|
||||
```` markdown title="Code block"
|
||||
``` { .sh data-copy="curl https://www.example.com" }
|
||||
$ curl https://www.example.com
|
||||
# <!doctype html>
|
||||
# <html>
|
||||
# ...
|
||||
```
|
||||
````
|
||||
|
||||
<div class="result" markdown>
|
||||
|
||||
``` { .sh data-copy="curl https://www.example.com" }
|
||||
$ curl https://www.example.com
|
||||
# <!doctype html>
|
||||
# <html>
|
||||
# ...
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
We recommend to use this very sparingly, because sometimes it can be
|
||||
confusing to copy something different to the clipboard than what is
|
||||
actually displayed.
|
||||
|
||||
### Code selection button
|
||||
|
||||
<!-- md:sponsors -->
|
||||
|
Loading…
Reference in New Issue
Block a user