akun / yii2-copy-text
yii2 copy-text
0.0.4
2019-08-16 08:36 UTC
Requires
- php: >=7.0.0
- yiisoft/yii2: ^2.0
- yiisoft/yii2-bootstrap: ~2.0.0
This package is auto-updated.
Last update: 2024-05-16 20:08:37 UTC
README
usage
- single use
echo CopyText::widget([ 'text' => 'something to copy' ]);
- full config
echo CopyText::widget([ 'text' => [ 'msg' => 'something to copy', 'tag' => 'span', 'options' => [ 'class' => 'js-copy-target' ] ], 'button' => [ 'msg' => 'copy', 'tag' => 'a', 'options' => [ 'class' => 'btn btn-primary js-copy-button' ] ], 'copiedText' => 'copied' ]);