{"_id":"highlightjs-copy","_rev":"7-ed1a5711f406dec8c2f7f1327f61635f","name":"highlightjs-copy","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"highlightjs-copy","version":"1.0.0","author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"license":"ISC","_id":"highlightjs-copy@1.0.0","maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"homepage":"https://github.com/arronhunt/highlightjs-copy","dist":{"shasum":"6558c7f287de9df485763ec3417e02736a300d3c","tarball":"https://registry.npmjs.org/highlightjs-copy/-/highlightjs-copy-1.0.0.tgz","fileCount":9,"integrity":"sha512-JhG7+PjX1GfjxVywDdBlPr8KG4+Dxo1QrK1Yg4QshJRMItNzFjL7LEvBFEXZyKq04iMViJQc30mIhBBq3F9uBw==","signatures":[{"sig":"MEYCIQDFHkjBcGHkvN9tGIdmnp6DsqaGXm+vILoluoqUw4ZrhwIhAPJRUCWwF+uNIbgkPCLFeEsBxqjs7Ds32+U4fCdkVVHc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxkNtCRA9TVsSAnZWagAA2ugP/RguSgZQcjgfRPlDFslI\nk6UI7fDYxlIvbmAQhqDWV2cIb8S/EMs5/oydUKjZYSqzGK3pO0ehsZvvOuJ6\nXJGkYDB1Py18j14vcv0/X/ZxF7q754KIsxcwJXLtQxESM0TSs38kOHlG2gFc\nTDv1PwBOMTFyKWtky8Q7aXr0MT1BPhZ58O8/trCax5RHNK4CT4vEfT8CEwHQ\n6Ii+OHEauVUWpYR5/IMGWTEGmbjjjBoP1HcTXCr0xQb4ofCnW3W72SS3MexD\n9xMXqfwKDxYZLO0y9PL5amSdH14q0B5RClLpgRcNy/pA64B9i41q2FJEzL6c\nV/mXP7jjqcfqJD7mFtl2zlTomHGpsoJC7BpLhBxYDWuYVCLymbf2qKNhVT4e\ntudWbwTRtNaVG9iYftz3B2Gxoj+bO50I2BrO8v3OKo62R0i9qRv05ELIyqsv\n8s0BR82OkkFDPM5kGnxNsaYjg5tB/fl7qv3+0rzSo5ppxbucGMwtZd1DBd/2\nUc7irlT0bllw2PL6aqVdbJIxpgKLoRn1yc5a+XsWFCpsyKQ0iv0AElfSuU1l\n0grch4qidE25Yz08bI14uExsFDiYq3sEja9M8/fBQkyWjqbF04z2AiN9qfNC\nbdZS+8YJvuyCKS/Krgf6FeU+2jfeifmcJ3Pl/KeIYm1E4LXzyNmbxxeWnmwj\n8UZH\r\n=ZxpU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"f5cd392eb1c124b0152a6469fc616612b041ac1e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"uglifyjs index.js -o ./dist/highlightjs-copy.min.js && uglifycss highlightjs-copy.css > ./dist/highlightjs-copy.min.css && exit"},"_npmUser":{"name":"arronhunt","email":"arronjhunt@gmail.com"},"_npmVersion":"6.14.8","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","directories":{},"_nodeVersion":"12.16.1","_hasShrinkwrap":false,"devDependencies":{"uglify-js":"^3.13.9","uglifycss":"0.0.29"},"_npmOperationalInternal":{"tmp":"tmp/highlightjs-copy_1.0.0_1623606125532_0.37280624756728065","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"highlightjs-copy","version":"1.0.1","author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"license":"ISC","_id":"highlightjs-copy@1.0.1","maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"homepage":"https://github.com/arronhunt/highlightjs-copy","dist":{"shasum":"56074aacac6541719b0bb696c8994ae058c02b10","tarball":"https://registry.npmjs.org/highlightjs-copy/-/highlightjs-copy-1.0.1.tgz","fileCount":9,"integrity":"sha512-qyxMKClQR4YiQ6Te+AXaSiukSkhjbXlDTx6UV45jRgjB04SGgws9HwmsaLUdBs1cEQg6dKfDWmTI5RE0jYK3Iw==","signatures":[{"sig":"MEUCIQCidafcPo9NHbZS5tjZ/HQz3rnWwGJLYwcnyZBs9LcjoQIgFjo0tpVsOWnoMYQ/PY5SQA4lDCuuwW//JwzZwr+0qK8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxkruCRA9TVsSAnZWagAAx4YP/1VUJTZsAUc9gyle3+ga\n4zkH0yjSQMSC9O0ZUN+VKcKfFv3oy4WUGvjAVDxf5puTiAzef0p6IfOYJJ9u\neWBaWffrYpAYJMvgSsGQci3a4IYt1SLwGeRfAWEqHg9GuWNdZCt6Gui+U4tP\nkpYScgV10cnq8WL+4fvJ8hXG19HB5dUrXaQn3KfwlicpIyvDEBb3WD19gI7E\n2smZ3bcK0tRuwa4cmclL980EnSHzcikPh2aX/h2pxBadBbLrXTGZ/Jv+ng2/\nzJwM85DZYNd398dVoANoL+0rRsDjyHYaE+4QkdZW+YU11iRWRdIjquGF+bH0\nludIfufL2ekrbeCy2Ay1Iw2hR4gh6jGKRzq5kBLk/4ymn94NqPDosCaFWxNW\nzJT8EbutApxnbGlgIgNmwDoLK9RreDqoXragSixCAi6wvLvOMEwPeDNiBcNy\n7u/etVrE5qnWxtAWroB2layms9oTWokxDamBUAQ19Z85Psig8zzeeJYMWhnI\n3Qvv+XLUBY+54xwz3veJ5yA7zrZWQJ+1Bkib6q+7RJa1q7tpq1uVCZtIV9Oq\nHoaEO4JdJHCVwyh+uz67qsJ41+gK6FiVftUOyVnup84hHdlr19HpA1bovWQF\nugqZroU4mg25aI5VCrdR8VRxY749EnZBFXKpvLKkF2ATAzkO8bygAVz17Aiy\nws40\r\n=1UBS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"f76d5721ac44b1412ae8c2a506ec496ef8ce457f","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"uglifyjs index.js -o ./dist/highlightjs-copy.min.js && uglifycss ./styles/highlightjs-copy.css > ./dist/highlightjs-copy.min.css && exit"},"_npmUser":{"name":"arronhunt","email":"arronjhunt@gmail.com"},"_npmVersion":"6.14.8","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","directories":{},"_nodeVersion":"12.16.1","_hasShrinkwrap":false,"devDependencies":{"uglify-js":"^3.13.9","uglifycss":"0.0.29"},"_npmOperationalInternal":{"tmp":"tmp/highlightjs-copy_1.0.1_1623608046033_0.86268017578392","host":"s3://npm-registry-packages"}},"1.0.2-next.0":{"name":"highlightjs-copy","version":"1.0.2-next.0","author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"license":"ISC","_id":"highlightjs-copy@1.0.2-next.0","maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"homepage":"https://github.com/arronhunt/highlightjs-copy","dist":{"shasum":"bb9f875a829bca45f75949a682c8c47bfdd72ee2","tarball":"https://registry.npmjs.org/highlightjs-copy/-/highlightjs-copy-1.0.2-next.0.tgz","fileCount":9,"integrity":"sha512-Ot6jt5R3VZilr3WKTOiBo6IzmDxcoiUHGP28fusTn937h6Kuzvni8nstIXE3H1ctVMwLa31SN78i7bh55No8Ww==","signatures":[{"sig":"MEYCIQCT9gBjgg8yYvIXPYRXsjS4FzAPgHdLT6Vv5BuyzoA5gQIhAIeUV7oB0xB4vvFHJiacudU2+u4fHZlAvIIA4Q3MdyGy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx+VoCRA9TVsSAnZWagAApdAP/14RRf7/6nOfjpeSOTw9\npERHp1RAinQwPab/t7oZsu6PZKVbR7XlC3QoLgDp5lNuLp8OY4xf7c4pBJZY\nfIQSe3Z7tuH8f42H2eob6XH/8BQK6X+SQB6f3On1DNhBq7+oXeUVoFpiWFSz\nL6GDzuY2Mn5o+jLrO166m5LkMYxaEsfRpDeLwyBF09lIODXv1D8c/C0LIXfu\nys7BvW7f2CidlcWYy94WDSiomu1Dbal/zNORqPNzHBfNlB233SlRR3IWzpMr\nTA90zpeO2q/cpxWeb0ePXkTPao7BuHxfgGbld68z7cqsJtcOMf8c/j/cIhE+\nuJc6Btb7/DSq9emDiu/vFEDWPvmZZvwy7VbR06rgFt1WaY9ihif2SCTrkb+q\nnRfJ8uWoj5/vcymFmAuS+Lo3cP/5DFUvO/U63sfctEgWIoETx7VZlvwV0PKK\nSIhrYrX3rFb5OcRddOQUmgK2sG9qRUa1VmMmIdV+QwHjfOAqbbN9PvH3Juus\nR+gqsaOHvwtcI4AkSMJjGev8o/voYn3Ub1Xns4e63Fwrmd37Amb33GH9JdHh\nM3PXnfmInBqJ+VyrA0AfREKwTlE00LfWbx9ikCnrLG+LfD6ffPFWUlehWROA\nBd70WY7hc63shx03AqALp6HSPlqmfYEx4bs0LM2DywsoJsz7IN+EfHKA/JWV\n/1RO\r\n=390r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4d552b6c15de86e9c6f014f6ddec6d68ad97b4f5","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"uglifyjs index.js -o ./dist/highlightjs-copy.min.js && uglifycss ./styles/highlightjs-copy.css > ./dist/highlightjs-copy.min.css && exit"},"_npmUser":{"name":"arronhunt","email":"arronjhunt@gmail.com"},"_npmVersion":"6.14.8","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","directories":{},"_nodeVersion":"12.16.1","_hasShrinkwrap":false,"devDependencies":{"uglify-js":"^3.13.9","uglifycss":"0.0.29"},"_npmOperationalInternal":{"tmp":"tmp/highlightjs-copy_1.0.2-next.0_1623713128004_0.8851674248778469","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"highlightjs-copy","version":"1.0.3","author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"license":"ISC","_id":"highlightjs-copy@1.0.3","maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"homepage":"https://github.com/arronhunt/highlightjs-copy","dist":{"shasum":"792c3b92eba5a5d61977ce28d7d9662c3c11f713","tarball":"https://registry.npmjs.org/highlightjs-copy/-/highlightjs-copy-1.0.3.tgz","fileCount":9,"integrity":"sha512-vXHBmzz7IuJg8f5ixX7qxhfCCDnEQCXRuIzcd7yTblJazZT3ZkaRto0md8IfBu86JdK4VRIdKMubxKt7kwNGfg==","signatures":[{"sig":"MEUCIG2bqNCNq86Itja6PldzNcfPYPupzjQW543p/DlKMnfEAiEA0oZ21UP0sUeAuKlyOA0nsrJ5DIA5JqZkKDzCa4ZVTnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7Gu/CRA9TVsSAnZWagAACTYP/069hQDsVwySNV/O6fny\nrwlLCxVOA2ZjNkFNdAErIM3FOcSXsNNOgRZUqdVoJsOSdSu21kUH7T0M4iqO\nOhYtFoEdJigJPAccf73OuJl0ouRFntEnffOA2YdW4rxGxsVhUcxz/AGI+6fp\nHbfgiQufiPthxeZko24Zd8nIvihf0iTo0XuAQZR8+NSfiLMdQB+HdN8WZLPY\naQSn9PRmOiQbP2LIsj5Gy7lQwATiOOUecEhST9uf/fignXI/1sJ5+2XEzTgT\nLCB4+apW0bya5vCIsaMvRqlHL28AU55uMv9oXLvSlD7bW4qIRJ0jrW94bUVG\nkj7pfYmzSXW70MJ/FRA+jxHZZu8/dP0FgQ0ubyoY2+aDkyBK4J5MD1uJRjZ4\n5f1X90gwmcRiJKkpU30awF+AvXiQqowE34UAlxzZ2RVDBpp3kwiYm17XoZZy\nUjUFCbfC22x9gW4AE62tQiV9dvUpk/J6BwVXUK8I3qS/EnBYAHTN7cr78Z98\nwvRuTfWBIbPyvNr9v4VWy4/yxY1gpaMYKqZBmNem+wgEksAxcfcdld0gs7/O\nflEbNILtPAeiew9lG2f7RjaeWY4dtxjwiQ1NmO5nFq+MOPJl4G17BE3m5bNX\nSXvun9GU/mEZ2lC+gk2AlIe+8UvQcTXGYSPN1hvSzxLpS0FKc6GjsRZgVZ1t\n9Ef1\r\n=CE0C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"072eb7123b9338dc7e81f68ef366ca43dbc712bd","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"uglifyjs index.js -o ./dist/highlightjs-copy.min.js && uglifycss ./styles/highlightjs-copy.css > ./dist/highlightjs-copy.min.css && exit"},"_npmUser":{"name":"arronhunt","email":"arronjhunt@gmail.com"},"_npmVersion":"6.14.8","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","directories":{},"_nodeVersion":"12.16.1","_hasShrinkwrap":false,"devDependencies":{"uglify-js":"^3.13.9","uglifycss":"0.0.29"},"_npmOperationalInternal":{"tmp":"tmp/highlightjs-copy_1.0.3_1626106815237_0.37809516386956044","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"highlightjs-copy","version":"1.0.4","author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"license":"ISC","_id":"highlightjs-copy@1.0.4","maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"homepage":"https://github.com/arronhunt/highlightjs-copy","dist":{"shasum":"1b23b151459d740e284eb5d9a4791bf0664e07c1","tarball":"https://registry.npmjs.org/highlightjs-copy/-/highlightjs-copy-1.0.4.tgz","fileCount":10,"integrity":"sha512-v7afvU8Go8UTO9GBAawRUXWYWDDiV4Sto0S8j5PCHh3ZORkC8aqD15X1AcgsGmEuy8xiPlz+YXyvDDmvB+Lcbg==","signatures":[{"sig":"MEYCIQCejSfwlOOppz/JH+VsLsWJbllIZQRJdbWQTlIXwOAm9wIhAPJbZzZ6W7+NNMnPcTM728DqvV8xDxgpb8L2Tm8crQoU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35753},"main":"index.js","gitHead":"af9eb53b47630b79ea526a0c9d0074f5b27135a9","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"uglifyjs index.js -o ./dist/highlightjs-copy.min.js && uglifycss ./styles/highlightjs-copy.css > ./dist/highlightjs-copy.min.css && exit"},"_npmUser":{"name":"arronhunt","email":"arronjhunt@gmail.com"},"_npmVersion":"8.5.1","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","directories":{},"_nodeVersion":"16.14.0","_hasShrinkwrap":false,"devDependencies":{"uglify-js":"^3.13.9","uglifycss":"0.0.29"},"_npmOperationalInternal":{"tmp":"tmp/highlightjs-copy_1.0.4_1687836051664_0.707926355767801","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"highlightjs-copy","version":"1.0.5","author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"license":"ISC","_id":"highlightjs-copy@1.0.5","maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"homepage":"https://github.com/arronhunt/highlightjs-copy","dist":{"shasum":"44fa17c2d3ed27d87ca8efcb67a937e7f760ce4a","tarball":"https://registry.npmjs.org/highlightjs-copy/-/highlightjs-copy-1.0.5.tgz","fileCount":10,"integrity":"sha512-e7vXcq4HyMqXEw9omt8riYMxEGSanjY2bLQL91Jk0zGnqEhs/pO/6X4tC0PQEVkGBqUdYUyfr06V/VEfQZ7Pmg==","signatures":[{"sig":"MEQCIDvslpxZKnvUTVAoTGxrNxnys2VEPTF7n9Z9Mype5Gw0AiBlHj/6Ump0omrFz63+YRAfLE8haUNgmgHXthO0QlxjJg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35899},"main":"index.js","gitHead":"f637a8e6023a64c2cb53564b74365b38fba85c34","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"uglifyjs index.js -o ./dist/highlightjs-copy.min.js && uglifycss ./styles/highlightjs-copy.css > ./dist/highlightjs-copy.min.css && exit"},"_npmUser":{"name":"arronhunt","email":"arronjhunt@gmail.com"},"_npmVersion":"8.5.1","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"uglify-js":"^3.13.9","uglifycss":"0.0.29"},"_npmOperationalInternal":{"tmp":"tmp/highlightjs-copy_1.0.5_1692380734852_0.3932530149492315","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"highlightjs-copy","version":"1.0.6","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"uglifyjs index.js -o ./dist/highlightjs-copy.min.js && uglifycss ./styles/highlightjs-copy.css > ./dist/highlightjs-copy.min.css && exit"},"author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"homepage":"https://github.com/arronhunt/highlightjs-copy","license":"ISC","devDependencies":{"uglify-js":"^3.13.9","uglifycss":"0.0.29"},"gitHead":"c7fd937949b4f927c756c2f0dd870bba368448d5","_id":"highlightjs-copy@1.0.6","_nodeVersion":"18.18.0","_npmVersion":"8.5.1","dist":{"integrity":"sha512-UaHIlJ4rkk5R4OVDnpgxevIuYdHggN5sPgs3E/2FKLxypvzAQVTOZl66hm8cEnhrEoLHTGkQymLtfJ/efyv24Q==","shasum":"060b15f08b25907fef5f07bc076bfdff358d4edf","tarball":"https://registry.npmjs.org/highlightjs-copy/-/highlightjs-copy-1.0.6.tgz","fileCount":10,"unpackedSize":38527,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLQJA7SFUlF+Jo87mdn+cg0Rd+dG6yAreAVQbQfRaKvAiB0z5IA9r7youfsiAEnwotWzxAtC3wKlEAqXr+LinCTsA=="}]},"_npmUser":{"name":"arronhunt","email":"arronjhunt@gmail.com"},"directories":{},"maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/highlightjs-copy_1.0.6_1729115002770_0.200707414018658"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-13T17:42:05.532Z","modified":"2024-10-16T21:43:23.235Z","1.0.0":"2021-06-13T17:42:05.670Z","1.0.1":"2021-06-13T18:14:06.181Z","1.0.2-next.0":"2021-06-14T23:25:28.158Z","1.0.3":"2021-07-12T16:20:15.388Z","1.0.4":"2023-06-27T03:20:51.873Z","1.0.5":"2023-08-18T17:45:35.072Z","1.0.6":"2024-10-16T21:43:23.059Z"},"author":{"name":"Arron Hunt","email":"arronjhunt@gmail.com"},"license":"ISC","homepage":"https://github.com/arronhunt/highlightjs-copy","description":"A simple, accessible highlightjs plugin to add a copy button to your codeblocks.","maintainers":[{"name":"arronhunt","email":"arronjhunt@gmail.com"}],"readme":"# highlightjs-copy\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/6b2257bf-a914-4f05-8166-a678eaff9fe8/deploy-status)](https://app.netlify.com/sites/highlightjs-copy/deploys)\n\nA simple, accessible [highlightjs](https://github.com/highlightjs/highlight.js) plugin to add a copy button to your codeblocks.\n\n![Preview](https://repository-images.githubusercontent.com/376601151/45b9bc80-cc37-11eb-936c-c3a55741bf77)\n\n## Demo\n\n[Check out the demo](https://highlightjs-copy.netlify.app)\n\n## Install\n\n### Using a CDN\n\n```html\n<script src=\"https://unpkg.com/highlightjs-copy/dist/highlightjs-copy.min.js\"></script>\n```\n\n```html\n<link\n  rel=\"stylesheet\"\n  href=\"https://unpkg.com/highlightjs-copy/dist/highlightjs-copy.min.css\"\n/>\n```\n\n### NPM\n\n```bash\nnpm install highlightjs-copy\n```\n\n## Usage\n\n### Basic usage\n\n```javascript\nhljs.addPlugin(new CopyButtonPlugin());\n```\n\n### Autohide\n\nBy default, the copy button is hidden until a user hovers the code block. Set this to `false` to have the copy button always visible.\n\n```javascript\nhljs.addPlugin(\n  new CopyButtonPlugin({\n    autohide: false, // Always show the copy button\n  })\n);\n```\n\n### With a callback\n\n```javascript\nhljs.addPlugin(\n  new CopyButtonPlugin({\n    callback: (text, el) => console.log(\"Copied to clipboard\", text),\n  })\n);\n```\n\n### Modify copied text with hooks\n\n```javascript\nhljs.addPlugin(\n  new CopyButtonPlugin({\n    hook: (text, el) => text + \"\\nCopied from my cool website.\",\n  })\n);\n```\n\n### Advanced hook example\n\n```html\n<!-- Code block example -->\n<pre>\n  <code class=\"language-bash\" data-replace=\"{{YOUR_API_KEY}}\" data-replaceWith=\"grtf32a35bbc...\">\n    gretel configure --key {{YOUR_API_KEY}}\n  </code>\n</pre>\n\n<script>\n  hljs.addPlugin(\n    new CopyButtonPlugin({\n      hook: (text, el) => {\n        let { replace, replacewith } = el.dataset;\n        if (replace && replacewith) {\n          return text.replace(replace, replacewith);\n        }\n        return text;\n      },\n      callback: (text, el) => {\n        /* logs `gretel configure --key grtf32a35bbc...` */\n        console.log(text);\n      },\n    })\n  );\n  hljs.highlightAll();\n</script>\n```\n\n## Localization\n\nhighlightjs-copy supports multiple locales by providing the correct language for accessibility.\n\n```js\nhljs.addPlugin(\n  new CopyButtonPlugin({\n    lang: \"es\", // The copy button now says \"Copiado!\" when selected.\n  })\n);\n```\n\nThis option is unnecessary if you correctly add the lang attribute to your document. You can override this behavior by providing the `lang` option as described above.\n\n```html\n<html lang=\"es\">\n  <body>\n    <!-- The plugin language defaults to `es` to match the document, so manually setting it is unnecessary. -->\n    <script>\n      hljs.addPlugin(new CopyButtonPlugin());\n    </script>\n  </body>\n</html>\n```\n\nIf the document has no `lang` set and the `lang` option is not provided, it will default to `en`.\n\n## Customization\n\n| CSS selector           | Details                                                                                                                                                                                                                             |\n| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `.hljs-copy-wrapper`   | Applied to the parent `<pre>` element that wraps the .hljs code.                                                                                                                                                                    |\n| `.hljs-copy-container` | A parent element to the button, in charge of absolute positioning and animating the button when hovering.                                                                                                                           |\n| `.hljs-copy-button`    | The copy button itself.<br /><br />The variables `--hljs-theme-background` and `--hljs-theme-color` are automatically applied to the parent element. This allows the button to inherit the code block's text and background colors. |\n| `[data-copied='true']` | This data attribute is applied to the copy button and is set to `true` for two seconds when the copy action is performed.                                                                                                           |\n| `.hljs-copy-alert`     | A visually hidden status element that announces the copy confirmation to screen readers.                                                                                                                                            |\n","readmeFilename":"README.md"}