Nicolas01 / Highlightjs_Integration

A MediaWiki extension to use the client-side syntax highlighter highlight.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FeatReq: Add a 'Copy to clipboard' icon

RenHoekNL opened this issue · comments

A lot of my wiki code is 'ready to copy and paste' but sometimes pretty long making it a bother to select and ctrl-c

I request a new parameter 'clipboard' to be added which will show an icon or whatever in the corner of the highlighted code, which when pushed, copies the entire highlighted code to the clipboard.

An example of the needed JS to do this:

onclick='Notification.requestPermission(); navigator.clipboard.writeText(this.textContent); new Notification("", {body:"Copied to clipboard", silent: true});'