Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artiely/vuepress-plugin-copy-code
https://github.com/artiely/vuepress-plugin-copy-code
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/artiely/vuepress-plugin-copy-code
- Owner: artiely
- License: other
- Created: 2020-03-30T06:54:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T10:18:22.000Z (almost 3 years ago)
- Last Synced: 2024-11-08T04:23:20.318Z (about 2 months ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vuepress-plugin-copy-code
> A vuepress plugin for clipboard-copy
## Install
``` bash
# install dependencies
npm i vuepress-plugin-copy-code -D# or use yarn
yarn add vuepress-plugin-copy-code -D
```## Usage
Write vuepress config
``` javascript
module.exports = {
plugins: ['copy-code']
}
```## Options
This plugin supports the following configurations.
``` javascript
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.
}]
}
```
## demo
[https://artiely.gitee.io](https://artiely.gitee.io)