-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
47 lines (42 loc) · 1.39 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Inline Edit</title>
<meta name="author" content="Adam Sanderson">
<link rel="stylesheet" href="build/build.css" type="text/css" media="screen" charset="utf-8">
<style type="text/css" media="screen">
body {
padding: 20px;
font-family: sans-serif;
background: white;
}
footer {
position: fixed;
bottom: 20px;
background: white;
}
</style>
</head>
<body>
<h1><input id='header' value='Inline Edit Component'></h1>
<p id='content'>
This is a demo of the inline-edit component.
This content is editable. Check your development console to see change events that are fired.
</p>
<footer>
See the <a href='https://github.com/adamsanderson/inline-edit/'>GitHub repository</a> for more information.
</footer>
<script src="build/build.js" type="text/javascript" charset="utf-8"></script>
<script>
var inlineEdit = require('inline-edit');
var events = require('component-event');
inlineEdit(document.getElementById('header'));
inlineEdit(document.getElementById('content'));
events.bind(document, 'change', function(event){
console.log('change event triggered:', event);
console.log('new value', event.target.value);
});
</script>
</body>
</html>