mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Updates snippets to be the same as actual demos
This commit is contained in:
parent
69ef493350
commit
b2c50bd127
18
index.html
18
index.html
@ -63,7 +63,9 @@ allowtransparency="true" frameborder="0" scrolling="0" width="156" height="30"><
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<pre><code class="html"><!-- Trigger -->
|
<pre><code class="html"><!-- Trigger -->
|
||||||
<button class="btn" data-text="Heya!">Copy</button></code></pre>
|
<button class="btn" data-text="Just because you can doesn't mean you should — clipboard.js">
|
||||||
|
Copy to clipboard
|
||||||
|
</button></code></pre>
|
||||||
|
|
||||||
<h3>Copy text from another element</h3>
|
<h3>Copy text from another element</h3>
|
||||||
|
|
||||||
@ -76,18 +78,20 @@ allowtransparency="true" frameborder="0" scrolling="0" width="156" height="30"><
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="foo" type="text" value="https://github.com/zenorocha/clipboard.js.git">
|
<input id="foo" type="text" value="https://github.com/zenorocha/clipboard.js.git">
|
||||||
<span class="input-group-button">
|
<span class="input-group-button">
|
||||||
<button aria-label="Copy to clipboard" class="btn" type="button" data-action="copy" data-target="foo">
|
<button aria-label="Copy to clipboard" class="btn" type="button" data-target="foo">
|
||||||
<img class="clippy" src="assets/clippy.svg" width="13" alt="Clipboard icon">
|
<img class="clippy" src="assets/clippy.svg" width="13" alt="Copy to clipboard">
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<pre><code class="html"><!-- Target -->
|
<pre><code class="html"><!-- Target -->
|
||||||
<input id="foo" value="https://git.io/vn3cM">
|
<input id="foo" value="https://github.com/zenorocha/clipboard.js.git">
|
||||||
|
|
||||||
<!-- Trigger -->
|
<!-- Trigger -->
|
||||||
<button class="btn" data-target="foo">Copy</button></code></pre>
|
<button class="btn" data-target="foo">
|
||||||
|
<img src="assets/clippy.svg" alt="Copy to clipboard">
|
||||||
|
</button></code></pre>
|
||||||
|
|
||||||
<h3>Cut text from another element</h3>
|
<h3>Cut text from another element</h3>
|
||||||
|
|
||||||
@ -108,11 +112,11 @@ allowtransparency="true" frameborder="0" scrolling="0" width="156" height="30"><
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<pre><code class="html"><!-- Target -->
|
<pre><code class="html"><!-- Target -->
|
||||||
<textarea id="bar">clipboard.js rocks!</textarea>
|
<textarea id="bar">Mussum ipsum cacilds...</textarea>
|
||||||
|
|
||||||
<!-- Trigger -->
|
<!-- Trigger -->
|
||||||
<button class="btn" data-action="cut" data-target="bar">
|
<button class="btn" data-action="cut" data-target="bar">
|
||||||
Copy
|
Cut to clipboard
|
||||||
</button></code></pre>
|
</button></code></pre>
|
||||||
|
|
||||||
<p>As you may expect, the <code>cut</code> action only works on <code><input></code> or <code><textarea></code> elements.</p>
|
<p>As you may expect, the <code>cut</code> action only works on <code><input></code> or <code><textarea></code> elements.</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user