vuepress-copycode

1.0.1 • Public • Published

vuepress-copycode

A vuepress plugin for clipboard-copy

Install

# install dependencies
npm i vuepress-copycode -D

# or use yarn
yarn add vuepress-copycode -D

Usage

Write vuepress config

module.exports = {
  plugins: ['vuepress-copycode']
}

Options

This plugin supports the following configurations.

module.exports = {
  plugins: ['vuepress-copycode, {
    copySelector: ['div[class*="language-"] pre', 'div[class*="aside-code"] aside'], // String or Array
    copyMessage: '复制成功', // default is 'Copy successfully and then paste it for use.'
    duration: 300, // prompt message display time.
    showInMobile: false // whether to display on the mobile side, default: false.
  }]
}

Package Sidebar

Install

npm i vuepress-copycode

Weekly Downloads

5

Version

1.0.1

License

ISC

Unpacked Size

11.1 kB

Total Files

10

Last publish

Collaborators

  • wtlong