From b2c50bd127a814ed8b00d56b5a61100ab4c82391 Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Mon, 21 Sep 2015 11:00:14 -0700 Subject: [PATCH] Updates snippets to be the same as actual demos --- index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index d74b4d4..cfe776e 100644 --- a/index.html +++ b/index.html @@ -63,7 +63,9 @@ allowtransparency="true" frameborder="0" scrolling="0" width="156" height="30"><
<!-- Trigger -->
-<button class="btn" data-text="Heya!">Copy</button>
+<button class="btn" data-text="Just because you can doesn't mean you should — clipboard.js"> + Copy to clipboard +</button>

Copy text from another element

@@ -76,18 +78,20 @@ allowtransparency="true" frameborder="0" scrolling="0" width="156" height="30"><
-
<!-- Target -->
-<input id="foo" value="https://git.io/vn3cM">
+<input id="foo" value="https://github.com/zenorocha/clipboard.js.git">
 
 <!-- Trigger -->
-<button class="btn" data-target="foo">Copy</button>
+<button class="btn" data-target="foo"> + <img src="assets/clippy.svg" alt="Copy to clipboard"> +</button>

Cut text from another element

@@ -108,11 +112,11 @@ allowtransparency="true" frameborder="0" scrolling="0" width="156" height="30"><
<!-- Target -->
-<textarea id="bar">clipboard.js rocks!</textarea>
+<textarea id="bar">Mussum ipsum cacilds...</textarea>
 
 <!-- Trigger -->
 <button class="btn" data-action="cut" data-target="bar">
-    Copy
+    Cut to clipboard
 </button>

As you may expect, the cut action only works on <input> or <textarea> elements.