saber-plugin-code-copy
v0.3.2
Published
Allow to copy code into clipboard
Readme
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.
