DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:copycode

This is an old revision of the document!


Copycode Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

plugin Copy code block to clipboard with just a click

Last updated on
2020-07-01
Provides
Action

Installation

:!: External requirements: This plugin requires jQuery (bundled with latests versions of DokuWiki).

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

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!

Development

Original javascript function: https://stackoverflow.com/questions/22581345/click-button-copy-to-clipboard-using-jquery by jfriend00. Adapted to suit the needs of the plugin.

Change Log

  • 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
    • Initial release

ToDo/Wish List

Only translated into English and French. Should add more languages.

plugin/copycode.1593639975.txt.gz · Last modified: 2020-07-01 23:46 by youplaboum

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki