vuepress-plugin-copy-code

0.0.1 • Public • Published

vuepress-plugin-copy-code

A vuepress plugin for clipboard-copy

npm GitHub stars GitHub license

Install

# install dependencies
npm i vuepress-plugin-copy-code -D
 
# or use yarn
yarn add vuepress-plugin-copy-code -D

Usage

Write vuepress config

module.exports = {
  plugins: ['copy-code']
}

Options

This plugin supports the following configurations.

module.exports = {
  plugins: ['copy-code', {
    copySelector: ['div[class*="language-"] pre', 'div[class*="aside-code"] aside'], // String or Array
    copyMessage: 'Copy successfully and then paste it for use.', // 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.
  }]
}

License

MIT.

Package Sidebar

Install

npm i vuepress-plugin-copy-code

Weekly Downloads

11

Version

0.0.1

License

MIT

Unpacked Size

13.9 kB

Total Files

10

Last publish

Collaborators

  • artiely