update styling and clean up demos

This commit is contained in:
nightwing 2013-04-14 21:20:54 +04:00
commit 63551228ee
20 changed files with 235 additions and 212 deletions

View file

@ -21,24 +21,10 @@
</head>
<body>
<pre id="editor">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.getModeFromPath(filePath).mode;
console.log(mode);
editor.getSession().setMode(mode);
}());
</pre>
<pre id="editor"></pre>
<script src="../build/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="../build/src-noconflict/ext-modelist.js" type="text/javascript" charset="utf-8"></script>
<script src="../build/src-noconflict/ace.js"></script>
<script src="../build/src-noconflict/ext-modelist.js"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
@ -52,10 +38,11 @@ editor.setTheme("ace/theme/twilight");
var filePath = 'blahblah/weee/some.js';
var mode = modelist.getModeFromPath(filePath).mode;
console.log(mode);
editor.getSession().setMode(mode);
editor.session.setMode(mode);
}());
</script>
<script src="./demo_helper.js"></script>
</body>
</html>