The Clipboard plugin uses clipboard.js to allow users to copy code snippets from the code panel. This is also compatible with Plugin Node Tab.
Read more about Pattern Lab Node Plugins
Follow the instructions found on the Pattern Lab Node wiki.
Make sure you replace the example with
npm install plugin-node-clipboard
Post-installation, the plugin should be added as a key to the plugins
object in your main Pattern Lab project's patternlab-config.json
file.
Example:
"plugins": {
"plugin-node-clipboard": {
"enabled": true,
"initialized": false
}
}
After install, you may manually enable or disable the plugin by finding the plugin-node-clipboard
key within your main Pattern Lab project's patternlab-config.json
file and setting the enabled
flag. In the future this will be possible via CLI.