Guide

Mr.Hope ... 2020-10-13 Less than 1 minute

# Usage

After enabling, this plugin will automatically add a copy button to the bottom right corner of each code block.

By default, the button is only displayed on desktop mode. To display this button on mobile devices, set showInMobile to true.

After user press the copy button, a success hint will display on the screen. The default hint duration is 2000ms, to change the duration, please set duration in options (ms). To disable the hint, set duration to 0.

# Effect

// .vuepress/config.js
module.exports = {
  plugins: [
    [
      "@mr-hope/copy-code",
      {
        // your options
      },
    ],
  ],
};
1
2
3
4
5
6
7
8
9
10
11