saber-plugin-copy-code
v0.2.0
Published
Allow to copy code into clipboard
Downloads
3
Readme
saber-plugin-code-copy
Copy code to clipboard.
Install
yarn add saber-plugin-code-copy
Usage
In your saber-config.yml
:
plugins:
- resolve: saber-plugin-code-copy
Options
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.