Skip to content

Commit

Permalink
package 06.09.2014
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Jun 9, 2014
1 parent 3bfda31 commit 966bcd1
Show file tree
Hide file tree
Showing 438 changed files with 165,257 additions and 160,369 deletions.
45 changes: 45 additions & 0 deletions demo/autocompletion.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!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="../src-noconflict/ace.js"></script>
<!-- load ace language tools -->
<script src="../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>
56 changes: 56 additions & 0 deletions demo/autoresize.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">

.ace_editor {
position: relative !important;
border: 1px solid lightgray;
margin: auto;
height: 200px;
width: 80%;
}
.scrollmargin {
height: 100px;
text-align: center;
}
</style>
</head>
<body>
<pre id="editor1">autoresizing editor</pre>
<div class="scrollmargin"></div>
<pre id="editor2">minHeight = 2 lines</pre>
<div class="scrollmargin"></div>
<pre id="editor"></pre>

<script src="../src/ace.js"></script>
<script>

var editor1 = ace.edit("editor1");
editor1.setTheme("ace/theme/tomorrow_night_eighties");
editor1.session.setMode("ace/mode/html");
editor1.setAutoScrollEditorIntoView(true);
editor1.setOption("maxLines", 30);

var editor2 = ace.edit("editor2");
editor2.setTheme("ace/theme/tomorrow_night_blue");
editor2.session.setMode("ace/mode/html");
editor2.setAutoScrollEditorIntoView(true);
editor2.setOption("maxLines", 30);
editor2.setOption("minLines", 2);

var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.session.setMode("ace/mode/html");
editor.setAutoScrollEditorIntoView(true);
editor.setOption("maxLines", 100);

</script>

<script src="./show_own_source.js"></script>

</body>
</html>
39 changes: 39 additions & 0 deletions demo/chromevox.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE ChromeVox 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="../src/ace.js"></script>
<!-- load ace accessibility extension -->
<script src="../src/ext-chromevox.js"></script>
<script>
// trigger extension
ace.require("ace/ext/chromevox");
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
editor.setTheme("ace/theme/tomorrow");
</script>

<script src="./show_own_source.js"></script>
</body>
</html>
41 changes: 41 additions & 0 deletions demo/emmet.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE Emmet 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 emmet code and snippets compiled for browser -->
<script src="https://nightwing.github.io/emmet-core/emmet.js"></script>

<!-- load ace -->
<script src="../src/ace.js"></script>
<!-- load ace emmet extension -->
<script src="../src/ext-emmet.js"></script>
<script>
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
// enable emmet on the current editor
editor.setOption("enableEmmet", true);
</script>

<script src="./show_own_source.js"></script>
</body>
</html>
44 changes: 44 additions & 0 deletions demo/ie7.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ACE Editor StatusBar Demo</title>
<style type="text/css" media="screen">
/*!important without this top: 0; bottom: 0 doesn't work on old ie */
body, html {
position: absolute;
top: 0px; bottom: 0; left: 0; right: 0;
margin:0; padding:0;
overflow:hidden
}

#editor {
margin: 0;
position: absolute;
top: 0; bottom: 0; left: 0; right: 0;
}
</style>
</head>
<body>

<pre id="editor">
require("ace/ext/old_ie");
// now ace will work even on ie7!
var editor = ace.edit("editor");
</pre>

<script src="../src/ace.js"></script>
<script src="../src/ext-old_ie.js"></script>
<script>
// before creating an editor patch up things for old ie
require("ace/ext/old_ie");
// now ace will work even on ie7!
var editor = ace.edit("editor");
editor.setTheme("ace/theme/textmate");
editor.session.setMode("ace/mode/javascript");
</script>


</body>
</html>
29 changes: 29 additions & 0 deletions demo/iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ACE Editor Inside iframe</title>
<style type="text/css" media="screen">
/*!important without this top: 0; bottom: 0 doesn't work */
body, html {
position: absolute;
top: 0px; bottom: 0; left: 0; right: 0;
margin:0; padding:0;
overflow:hidden
}

#editor {
padding: 20px;
position: absolute;
width: 80%;
height: 80%;
}
</style>
</head>
<body>

<iframe id="editor" src="../kitchen-sink.html"></iframe>

</body>
</html>
48 changes: 48 additions & 0 deletions demo/keyboard_shortcuts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</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="../src/ace.js"></script>
<script>
var editor = ace.edit("editor")
editor.setTheme("ace/theme/twilight")
editor.session.setMode("ace/mode/html")

// add command to lazy-load keybinding_menu extension
editor.commands.addCommand({
name: "showKeyboardShortcuts",
bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
exec: function(editor) {
ace.config.loadModule("ace/ext/keybinding_menu", function(module) {
module.init(editor);
editor.showKeyboardShortcuts()
})
}
})
editor.execCommand("showKeyboardShortcuts")
</script>

<script src="./show_own_source.js"></script>
</body>
</html>
49 changes: 49 additions & 0 deletions demo/modelist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ACE Editor Modelist 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="../src/ace.js"></script>
<!-- load ace modelist extension -->
<script src="../src/ext-modelist.js"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
(function () {
var modelist = ace.require("ace/ext/modelist");
// the file path could come from an xmlhttp request, a drop event,
// or any other scriptable file loading process.
// Extensions could consume the modelist and use it to dynamically
// set the editor mode. Webmasters could use it in their scripts
// for site specific purposes as well.
var filePath = "blahblah/weee/some.js";
var mode = modelist.getModeForPath(filePath).mode;
console.log(mode);
editor.session.setMode(mode);
}());
</script>

<script src="./show_own_source.js"></script>
</body>
</html>
Loading

0 comments on commit 966bcd1

Please sign in to comment.