0.2.0 • Published 6 years ago
saber-plugin-copy-code v0.2.0
saber-plugin-code-copy
Copy code to clipboard.
Install
yarn add saber-plugin-code-copyUsage
In your saber-config.yml:
plugins:
- resolve: saber-plugin-code-copyOptions
statusAttribute
- Type:
string - Default:
title
By default the title attribute of the button is set to Copy, when code is copied we update it to Copied, you can specify another attribute name if you want, e.g. aria-label.
buttonStyle
- Type:
object - Default:
undefined
Assign custom style to the Copy button, e.g.:
{
backgroundColor: 'red'
}License
MIT.
0.2.0
6 years ago