-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
59 lines (47 loc) · 1.16 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="builds/css/edittext.min.css">
<meta charset="UTF-8">
<title>Edit Text</title>
</head>
<body>
<div class="edittext" style="height: 300px" id="myEditor1">
</div>
<br />
<!-- <br />
<hr />
<br />
<div class="edittext" id="myEditor2">
</div>
<br />
<hr />
<br />
<div class="edittext" id="myEditor3">
</div><br />
<hr />
<br />
<div class="edittext" id="myEditor2">
</div>
<br />
<hr />
<br />
<div class="edittext" id="myEditor3">
</div> -->
<button onclick="getDataFromEditor()">Clique</button>
<div id="textoDigitado"></div>
<br />
<input type="text" id="inputHtml" class="color" />
<button onclick="setDataToEditor()">Clique</button>
<script type="text/javascript" src="builds/js/edittext.min.js"></script>
<script>
edittext.myEditor1.change = function(valor){ console.log(valor);}
function getDataFromEditor(){
document.getElementById('textoDigitado').innerHTML = edittext.myEditor1.getData();
}
function setDataToEditor(){
edittext.myEditor1.setData(document.getElementById('inputHtml').value);
}
</script>
</body>
</html>