I'd like to suggest an enhancement for your website. Adding a "copy"
button to the code blocks could significantly improve user experience.
This feature would allow users to easily copy code snippets, saving them
from manually selecting and copying, especially for larger blocks.
A small icon in the top right corner of each code block could serve as
this "copy" button. Upon clicking, it would copy the entire block of code
to the user's clipboard.
This feature is common on many programming and documentation websites and
could be a valuable addition to yours.
Thank you for considering this suggestion.
Best,
hehe
--
Ticket URL: <https://code.djangoproject.com/ticket/34846>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Sarah Boyce):
Just a note that I saw a PR for this
https://github.com/django/django/pull/16342/
--
Ticket URL: <https://code.djangoproject.com/ticket/34846#comment:1>
Comment (by David Sanders):
Possible duplicate of #18721 though that ticket contained 3 separate
feature requests.
I'd vote +1 on this, though we may need a forum post to review the
options. The plugin suggested in the above PR seems nice because it
handles `pycon` snippets removing prompts & output.
--
Ticket URL: <https://code.djangoproject.com/ticket/34846#comment:2>
* component: Uncategorized => Documentation
--
Ticket URL: <https://code.djangoproject.com/ticket/34846#comment:3>
Comment (by Sarah Boyce):
I would also +1. I think the request is reasonable and can see how this
would be a nice experience when going through the tutorials
--
Ticket URL: <https://code.djangoproject.com/ticket/34846#comment:4>
* Attachment "Screenshot_20230918_105141.png" added.
--
Ticket URL: <https://code.djangoproject.com/ticket/34846>
Comment (by Mariusz Felisiak):
Copy button is already there for file-specific snippets:
[[Image(Screenshot_20230918_105141.png)]]
--
Ticket URL: <https://code.djangoproject.com/ticket/34846#comment:5>