A vuepress plugin for Clipboard
# install
npm i vuepress-plugin-click-copy-markdown -D
# or use yarn
yarn add vuepress-plugin-click-copy-markdown -D
vuepress config
module.exports = {
plugins: ['vuepress-plugin-click-copy-markdown']
}
The plugin supports these configurations.
module.exports = {
plugins: ['vuepress-plugin-click-copy-markdown', {
ele: ['div[class*="language-"] pre', 'div[class*="aside-code"] aside'], // String or Array
title: 'copy',
tips: 'click to copy',
showIcon: false, // boolean tips: When true, the title is not an HTML tag string, and the default icon is displayed.
copyMessage: '复制成功,请粘贴后使用',
closeWait: 3000
}]
}