mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Only fire detailed events if copy was successful
This commit is contained in:
@ -13,13 +13,19 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Copy text from another element</p>
|
||||
<p>Copy text from non-input element</p>
|
||||
<p id="paragraph">hello</p>
|
||||
<button class="btn" data-action="copy" data-target="paragraph">Copy</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Copy text from input element</p>
|
||||
<input id="foo" type="text" value="hello">
|
||||
<button class="btn" data-action="copy" data-target="foo">Copy</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Cut text from another element</p>
|
||||
<p>Cut text from textarea element</p>
|
||||
<textarea id="bar">hello</textarea>
|
||||
<button class="btn" data-action="cut" data-target="bar">Cut</button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user