vuepress-plugin-copy-via-link

1.0.0 • Public • Published

vuepress-plugin-copy-via-link

vuepress npm npm

Copy text in vuepress via links

Install

yarn add -D vuepress-plugin-copy-via-link
# OR 
npm install -D vuepress-plugin-copy-via-link

Usage

module.exports = {
  plugins: [
    ['vuepress-plugin-copy-via-link', {
      start: '#copy:',
      message: '',
      manual_copy: ''
    }]
  ]
}

In markdown (#copy: is same as you configured above):

[Copy text](#copy:THE_TEXT_YOU_WANT_TO_COPY)

Options

start

  • Type: string
  • Default: #copy:

If a link contain the start string, the text after start string will be copy.

message

  • Type: string
  • Default: <empty string>

Show message when copy success. If empty string provided, nothing will be display.

manual_copy

  • Type: string
  • Default: <empty string>

Show message when copy failed to let users copy text by-hand. If empty string provided, nothing will be display.

Package Sidebar

Install

npm i vuepress-plugin-copy-via-link

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.46 kB

Total Files

6

Last publish

Collaborators

  • shuangya