plugin:copycode
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:copycode [2020-06-16 18:55] – Aleksandr | plugin:copycode [2024-01-14 11:34] (current) – 2a01:e0a:3df:e000:1f8:f941:1562:9714 | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : mail.nicolasprigent@gmail.com | email : mail.nicolasprigent@gmail.com | ||
type : Action | type : Action | ||
- | lastupdate : 2020-06-15 | + | lastupdate : 2023-11-08 |
- | compatible : Release rc-2020-06-09 " | + | compatible : Hogfather, 2022-07-31 ,2023-04-04 |
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
tags : clipboard, copy, code | tags : clipboard, copy, code | ||
downloadurl: | downloadurl: | ||
bugtracker : | bugtracker : | ||
- | sourcerepo : | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
Line 26: | Line 26: | ||
:!: **External requirements: | :!: **External requirements: | ||
- | Install the plugin using the [[plugin:plugin|Plugin | + | Install the plugin using the [[plugin:extension|Extension |
===== Usage ===== | ===== Usage ===== | ||
- | Adds a javascript click event on all code blocks that copy the content of the block to clipboard. Just click on a code block: done! | + | Adds a javascript click event on all code blocks that copy the content of the block to clipboard. Just click on a code block: done! You can also select a part of a code inside a code block, and the selection gets immediately copied to clipboard. With right click you can copy the code block without carriage returns. |
===== Development ===== | ===== Development ===== | ||
- | Original javascript function: https://stackoverflow.com/questions/ | + | This plugin uses the global Navigator.clipboard property. It can only be used on a secured environment and in a compatible navigator |
=== Change Log === | === Change Log === | ||
+ | * **2023-11-08** | ||
+ | Thanks to @tvataire (https:// | ||
+ | |||
+ | * Refactoring of the script.js file to make it easier to maintain | ||
+ | * New feature : added an option to disable inline copy on right-click | ||
+ | * New feature : added an option to disable auto-copy of highlighted text | ||
+ | * File cleaning (useless whitespaces and writes to the console, unix file format conversion) | ||
+ | |||
+ | * **2023-09-21** | ||
+ | * Fix : added code to prevent copy after scrolling the code block. | ||
+ | * New feature : added a list of cursor in configuration panel to choose the hover cursor on code blocks. | ||
+ | |||
+ | * **2023-05-28** | ||
+ | * Fix : copycode plugin now work under the .dokuwiki class instead of the mainpage id. | ||
+ | |||
+ | * **2022-09-12** | ||
+ | * Fix : commented an alert on unused mouse key clic (like previous or next buttons) | ||
+ | * **2022-03-02** | ||
+ | * Adds functionality to remove extra non ascii character bug | ||
+ | * Adds functionality and code logic for new mouse actions | ||
+ | * Adds inline copy on right click | ||
+ | * Removing default contextmenu on right click on a code block | ||
+ | * Better writing of jquery elements (using $ instead of repetitive jQuery function calls) | ||
+ | * **2021-08-09** | ||
+ | * Merged Pull Request from FootStark "Add inline code-copying with option" | ||
+ | * **2021-04-21** | ||
+ | * Added " | ||
+ | * **2021-02-18** | ||
+ | * If for any reason, navigator.clipboard fails, it uses the hidden textarea hack instead | ||
+ | * Added dutch language file | ||
+ | * **2020-09-21** | ||
+ | * Added code selection copy, with its own alert box | ||
+ | * css and js cleaning | ||
+ | * **2020-09-08** | ||
+ | * Refactoring of copycode functions with navigator.clipboard function instead of hidden input hack. Fixing the jump to top bug on android systems. See https:// | ||
+ | * **2020-08-30** | ||
+ | * Fix < | ||
+ | * **2020-07-01** | ||
+ | * Fix multi linebreaks when there is more than one code block | ||
+ | * **2020-06-25** | ||
+ | * Fix preventing jump to top while clicking the code block | ||
+ | * **2020-06-24** | ||
+ | * Fix of numbered lines issue | ||
+ | * Updated date and link to github repository | ||
* **2020-06-15** | * **2020-06-15** | ||
* Initial release | * Initial release | ||
Line 43: | Line 88: | ||
=== ToDo/Wish List === | === ToDo/Wish List === | ||
- | Only translated into English | + | Only translated into English, French, German and Dutch. Some translations are generated with Deepl and should be corrected. More languages should be added too, don't hesitate to help ! |
plugin/copycode.1592326519.txt.gz · Last modified: 2020-06-16 18:55 by Aleksandr