-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo.html
37 lines (36 loc) · 946 Bytes
/
demo.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
<html>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="contentEditable.js"></script>
<style>
.editableSpan {
font-size:20px;
padding:3px;
border:black solid 1px;
}
div.cursor {
display: inline-block;
background: #000;
margin-left: 1px;
position:fixed;
float:left;
top:16px;
left:20px;
width:1px;
animation: blink 1.2s linear 0s infinite;
-moz-animation: blink 1.2s linear 0s infinite;
}
@-moz-keyframes blink {
0% { opacity: 0}
100% {opacity: 1}
}
</style>
<script>
$(document).ready(function() {
$(".editableSpan").contentEditable();
});
</script>
<body>
<span class="editableSpan" contenteditable="true">Type here</span>
<div id="test" style="display:inline;font-size:30px;color:red">Try pasting or dragging this text</div>
</body>
</html>