2017 © Pedro Peláez
 

yii2-extension yii2-clipboard

The Clipboard js extension for the Yii2 framework

image

eddmash/yii2-clipboard

The Clipboard js extension for the Yii2 framework

  • Friday, November 11, 2016
  • by eddmash
  • Repository
  • 2 Watchers
  • 3 Stars
  • 5,554 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 6 % Grown

The README.md

yii2-clipboard

A Yii2 extension that makes it easy to copy input item value on to clipboard., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json., (*3)

Either run, (*4)

$ php composer.phar require eddmash/yii2-clipboard "@dev"

or add, (*5)

"eddmash/yii2-clipboard": "@dev"

to the require section of your composer.json file., (*6)

Usage

You can use the widget which create a input that has copy button., (*7)


echo \Eddmash\Clipboard\Clipboard::widget([ 'model' => $model, 'attribute' => 'email', 'options'=>['readonly'=>""] ]);

Or if you need to use it without a model. The Clipboard::input() method is works like HTML::tag() actually its use it to create its output. The only difference is that it takes the first argument as the view object on which the output is being done., (*8)


$url = "https://packagist.org/packages/eddmash/yii2-clipboard"; Clipboard::input($this, 'text', 'url', $url, ['id' => 'url', 'readonly' => true])

Or if simply need the composer.js loaded on a view, (*9)

    \Eddmash\Clipboard\ClipboardAsset::register($this)

Learn more yii2-clipboard documentation, (*10)

The Versions

11/11 2016

dev-master

9999999-dev

The Clipboard js extension for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 clipboard js