ndexbio / ndex2-client

NDEx2 Client
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Adding Copy Icon and Functionality to Code Block Template #99

Closed devarsh10 closed 7 months ago

devarsh10 commented 7 months ago

Description:

In this Blog Page: Link to Blog. Can we add the "Copy" Icon and functionality to the Code Snippets? So that, the user does not have to Ctrl+C, or Ctrl+V the whole block of code?

Implementation:

  1. Implement a copy icon adjacent to the code block.
  2. On clicking the copy icon or a designated button, the corresponding code snippet should be copied to the user's clipboard.
  3. Ensure compatibility with major browsers.

Regards, Devarsh Shah.

coleslaw481 commented 7 months ago

yes that is a good idea, I believe https://sphinx-copybutton.readthedocs.io/en/latest/ will do it, will try it out

coleslaw481 commented 7 months ago

made the fix. waiting for readthedocs to build and verify

coleslaw481 commented 7 months ago

Just checked https://ndex2.readthedocs.io/en/latest/quicktutorial.html and the copy icon appears and works. Closing ticket. Thanks for the suggestion.