From mediawiki.org
This extension is maintained by a member of the MediaWiki Stakeholders' Group .
MediaWiki extensions manual
Release status: stable
Implementation Parser extension , Skin
Description Adds a "Copy to clipboard"-Button to every ‎<pre>-tag
Author(s) Thomas Candrian, Robert Vogel
Latest version 2.0.0 (2023-05-05)
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki >= 1.39
Database changes No
Composer mediawiki/pre-to-clip
License Public domain
Quarterly downloads 42 (Ranked 123rd)
Translate the PreToClip extension if it is available at translatewiki.net

The PreToClip extension adds a "Copy to clipboard"-Button to every ‎<pre>-tag even auto-generated ones (e.g. by Extension:SyntaxHighlight ).


  • Download and place the file(s) in a directory called PreToClip in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'PreToClip' );
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

External links[edit]