/
index.html
41 lines (37 loc) · 1.18 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Assist example</title>
<link rel="stylesheet" type="text/css" href="./content-assist.css" />
<style type="text/css">
#wrap {
position: relative;
}
#input {
width: 90%;
height: 10em;
position: relative;
display: block;
}
#str {
width: 50%;
margin-top: 2em;
}
</style>
</head>
<body>
<p>Type a few words starting from "a": for example, "awesome", "amazing".</p>
<div id="wrap">
<textarea id="input"></textarea>
</div>
<input type="text" id="str" />
<script type="module">
import BasicContentAssist from './src/BasicContentAssist.js';
const words = ['after', 'any', 'also', 'around', 'another', 'ask', 'again', 'air', 'away', 'animal', 'answer', 'america', 'awesome', 'amazing'];
new BasicContentAssist(document.getElementById('input'), words);
new BasicContentAssist(document.getElementById('str'), words);
</script>
</body>
</html>