chornij/yii2-zeroclipboard
Composer 安装命令:
composer require chornij/yii2-zeroclipboard
包简介
The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
关键字:
README 文档
README
The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist chornij/yii2-zeroclipboard "dev-master"
or add
"chornij/yii2-zeroclipboard": "dev-master"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?= chornij\zeroclipboard\Button::widget([ 'label' => '<span class="glyphicon glyphicon-copy"></span> ' . \Yii::t('app', 'Copy'), 'encodeLabel' => false, 'text' => "$('.copy-selector').text()", ]) ?> <div class="copy-selector"> My text to copy! </div>
Once clicked on Copy button it should change the status to Copied! If it does not change then make sure that your Flash Plugin is enabled in browser. If you are using Chrome check the following settings: chrome://plugins/ and make sure that Adobe Flash Player plugin is enabled.
统计信息
- 总下载量: 9.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-31