-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.html
55 lines (51 loc) · 1.38 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="node_modules/tinymce/tinymce.min.js"></script>
<script src="plugin.js"></script>
<script defer>
tinymce.init({
selector: 'textarea', // change this value according to your HTML
license_key: 'gpl',
plugins: "suggestions",
promotion: false,
debounce_time: 100,
terms_list: [
'Adrar',
'Alger',
'Tizi-Ouzou',
'Oran',
'Ouargla',
'Annaba',
],
/*search_function: async (keyword) => {
const response = await fetch("https://baconipsum.com/api/?type=all-meat¶s=5&start-with-lorem=1");
if (response.ok) {
const jsonResponse = await response.json();
//return jsonResponse[0].split(' ').shift();
return jsonResponse;
} else {
throw new Error("ERR")
}
}*/
});
</script>
<title>TinyMCE suggestions</title>
</head>
<body>
<h1>TinyMCE suggestions</h1>
<textarea>
<p>Use one of this words from the list to see autocomplete. Use Tab for autocompletion</p>
<p>[
Adrar,
Alger,
Tizi-Ouzou,
Oran,
Ouargla,
Annaba
]</p>
</textarea>
</body>
</html>