46 lines
1020 B
HTML
46 lines
1020 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>ACE Autocompletion demo</title>
|
|
<style type="text/css" media="screen">
|
|
body {
|
|
overflow: hidden;
|
|
}
|
|
|
|
#editor {
|
|
margin: 0;
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<pre id="editor"></pre>
|
|
|
|
<!-- load ace -->
|
|
<script src="../build/src-noconflict/ace.js"></script>
|
|
<!-- load ace language tools -->
|
|
<script src="../build/src-noconflict/ext-language_tools.js"></script>
|
|
<script>
|
|
// trigger extension
|
|
ace.require("ace/ext/language_tools");
|
|
var editor = ace.edit("editor");
|
|
editor.session.setMode("ace/mode/html");
|
|
editor.setTheme("ace/theme/tomorrow");
|
|
// enable autocompletion and snippets
|
|
editor.setOptions({
|
|
enableBasicAutocompletion: true,
|
|
enableSnippets: true,
|
|
enableLiveAutocompletion: false
|
|
});
|
|
</script>
|
|
|
|
<script src="./show_own_source.js"></script>
|
|
</body>
|
|
</html>
|