Skip to content

Sanm-ZH/vuepress-plugin-click-copy-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vuepress-plugin-click-copy-markdown

A vuepress plugin for Clipboard

npm GitHub stars GitHub license

Install

# install
npm i vuepress-plugin-click-copy-markdown -D
# or use yarn
yarn add vuepress-plugin-click-copy-markdown -D

Usage

vuepress config

module.exports = {
  plugins: ['vuepress-plugin-click-copy-markdown']
}

Options

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
  }]
}