-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing_your_code.html
53 lines (43 loc) · 1.55 KB
/
testing_your_code.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
<html>
<head>
<title>
Templates.js - Getting Started
</title>
<!--
Required javascript libraries.
-->
<script src="./javascripts/jquery-3.5.1.min.js" type="text/javascript"></script>
<script src="./javascripts/1.3.0/adminflare-demo-init.min.js" type="text/javascript"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700" rel="stylesheet" type="text/css">
<!--
Required css files.
-->
<link href="./css/1.3.0/black-blue/bootstrap.min.css" media="all" rel="stylesheet" type="text/css" id="bootstrap-css">
<link href="./css/1.3.0/black-blue/adminflare.min.css" media="all" rel="stylesheet" type="text/css" id="adminflare-css">
<!--
Include these templates.js libraries and its css file.
-->
<link rel="stylesheet" href="./public/templatesjs/css/templates.css">
<script src="./public/templatesjs/javascripts/commons.js" type="text/javascript"></script>
<script src="./public/templatesjs/javascripts/templates.min.js" type="text/javascript"></script>
</head>
<body>
<textarea id='myCode' style='width:750px;'>My name is <!firstname!Write your first name here!> and I would like to invite you to my graduation, next .</textarea><br/>
<br/>
<div id='myTemplate' style='width:750px;'> </div>
</body>
<script>
var ctx = document.getElementById('myTemplate');
$('#myCode').keyup(function() {
templatesJs.draw(ctx, {
index: 0,
versions: [{
code: $('#myCode').text(),
}],
});
});
$(document).ready(function() {
$('#myCode').trigger('keyup');
});
</script>
</html>