-
Notifications
You must be signed in to change notification settings - Fork 52
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
Exclude unselectable text from being copied #138
Changes from all commits
3307827
ce16954
42355fc
e35b070
e683c26
03e46d4
ce20709
acc63cd
e78f41e
0941ef2
d1e4962
5e37a68
95be984
665fe0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -372,6 +372,17 @@ In this case, all elements that match ``your.selector`` will have a copy button | |||||||||
added to them. | ||||||||||
|
||||||||||
|
||||||||||
Exclude text | ||||||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||||||
|
||||||||||
You may exclude elements matching CSS selectors from being copied by specifying the `copybutton_exclude` option in ``conf.py``. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
.. code-block:: python | ||||||||||
|
||||||||||
copybutton_exclude = '.exclude_me' | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about instead of hard-coding |
||||||||||
|
||||||||||
By default `.linenos` is excluded. If you specify the `copybutton_exclude` option it will replace the default. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I am unsure if we want But, if we add |
||||||||||
|
||||||||||
Modify the copy button's CSS | ||||||||||
============================ | ||||||||||
|
||||||||||
|
@@ -466,7 +477,7 @@ Then run the docs build: | |||||||||
|
||||||||||
.. code-block:: console | ||||||||||
|
||||||||||
$ cd doc | ||||||||||
$ cd docs | ||||||||||
$ make html | ||||||||||
|
||||||||||
.. toctree:: | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.