-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmultiple-examples.html
86 lines (62 loc) · 3.73 KB
/
multiple-examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html>
<head>
<title>simple-copy.js</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<h1>Multiple examples</h1>
<div class="foo" contenteditable>
Hello, <strong>world</strong>! <u>foo</u> <i>bar</i> <s>baz</s>
</div>
<div class="bar">
Input field <input type="text" value="input value"><br>
Input readonly field <input type="text" value="input readonly value" readonly><br>
Input disabled field <input type="text" value="input disabled value" disabled><br>
Textarea field <textarea>Textarea</textarea><br>
Button <button>Button label</button><br>
Select field
<select>
<option>Option label</option>
</select><br>
foo bar baz
</div>
<div class="foobar">
<hr>
<button data-simplecopy-target=".foo[contenteditable]">Copy <div class=".foo[contenteditable]"></button>
<button data-simplecopy-target=".foo[contenteditable]" data-simplecopy-node="true">Copy <div class=".foo[contenteditable]"> (entiry node)</button>
<button data-simplecopy-target=".foo[contenteditable]" data-simplecopy-text="true">Copy <div class=".foo[contenteditable]"> (only text)</button>
<button data-simplecopy-target=".foo[contenteditable]" data-simplecopy-select="true">Select <div class=".foo[contenteditable]"></button>
<hr>
<button data-simplecopy-target=".bar">Copy <div class=".bar"></button>
<button data-simplecopy-target=".bar" data-simplecopy-node="true">Copy <div class=".bar"> (entiry node)</button>
<button data-simplecopy-target=".bar" data-simplecopy-select="true">Select <div class=".bar"></button>
<hr>
<button data-simplecopy-target=".bar > input">Copy <input></button>
<button data-simplecopy-target=".bar > input" data-simplecopy-node="true">Copy <input> (entiry node)</button>
<button data-simplecopy-target=".bar > input" data-simplecopy-select="true">Select <input></button>
<hr>
<button data-simplecopy-target=".bar > input[readonly]" data-simplecopy-node="true">Copy <input readonly> (entiry node)</button>
<button data-simplecopy-target=".bar > input[disabled]" data-simplecopy-node="true">Copy <input disabled> (entiry node)</button>
<hr>
<button data-simplecopy-target=".bar > textarea">Copy <textarea></button>
<button data-simplecopy-target=".bar > textarea" data-simplecopy-node="true">Copy <textarea> (entiry node)</button>
<button data-simplecopy-target=".bar > textarea" data-simplecopy-select="true">Select <textarea></button>
<hr>
<button data-simplecopy-target=".bar > button">Copy <button></button>
<button data-simplecopy-target=".bar > button" data-simplecopy-node="true">Copy <button> (entiry node)</button>
<button data-simplecopy-target=".bar > button" data-simplecopy-select="true">Select <button></button>
<hr>
<button data-simplecopy-target=".bar > select">Copy <select></button>
<button data-simplecopy-target=".bar > select" data-simplecopy-node="true">Copy <select> (entiry node)</button>
<button data-simplecopy-target=".bar > select" data-simplecopy-select="true">Select <select></button>
</div>
<div class="paste-here">
<div contenteditable="true"></div>
</div>
<link rel="stylesheet" type="text/css" href="example.css">
<script type="text/javascript" src="../simple-copy.min.js"></script>
</body>
</html>