vuepress-plugin-code-copy
vuepress-plugin-code-copy copied to clipboard
A Vuepress plugin that adds copy code buttons to all code blocks.
 配置如下: ``` //插件:提供代码拷贝功能 https://github.com/znicholasbrown/vuepress-plugin-code-copy ['vuepress-plugin-code-copy', { // selector: 'div[class*="language-"] pre', // align: 'bottom', //对其 top bottom color: '#fc2222',//颜色 backgroundTransition: true,//背景转换 当用户按下复制按钮时,启用附加代码块的背景过渡动画 backgroundColor: '#f63d3d',//背景颜色 successText: '已复制到剪切板!',//复制成功时 提示信息 staticIcon: true//false时 “复制图标”...
``` "devDependencies": { "@vuepress/plugin-active-header-links": "^1.9.9", "@vuepress/plugin-back-to-top": "^1.9.9", "@vuepress/plugin-medium-zoom": "^1.9.9", "@vuepress/plugin-search": "^1.9.9", "vuepress-plugin-right-anchor": "^0.5.5", "vuepress": "^1.9.9" }, "dependencies": { "vuepress-plugin-code-copy": "^1.0.6" } ``` ``` plugins: [ '@vuepress/plugin-back-to-top', '@vuepress/plugin-medium-zoom', '@vuepress/search', '@vuepress/active-header-links', ['vuepress-plugin-code-copy',...
Tried everything. Nothing appears.
when using ``` js module.exports = { plugins: [['vuepress-plugin-code-copy', true]] } ``` throws console error ``` Uncaught ReferenceError: selector is not defined ```
  I use the default theme. My configs for code blocks: ```js markdown: { lineNumbers: true, }, plugins: [ ['vuepress-plugin-code-copy', { align: 'top' }], ] ```
Can we have an option to trim the content? This is the scenario: 1. The docs give generic instructions to, for example, run a bash command 1. If the command...
Hi. My icon gets removed when I try to use the live editor plugin. And on top of that, the copy success text appears both on my previewed code, and...