From 10fe461ba5d4010d6b37650869f0a0256cc47e04 Mon Sep 17 00:00:00 2001 From: C9 Date: Mon, 17 Sep 2012 09:40:48 -0400 Subject: [PATCH] Some updates --- doc/site/js/main.js | 7 +++---- index.html | 17 ++++++----------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/doc/site/js/main.js b/doc/site/js/main.js index 0175a7b5..8a1fd27a 100644 --- a/doc/site/js/main.js +++ b/doc/site/js/main.js @@ -4,10 +4,9 @@ $(function() { hljs.initHighlighting(); editor = ace.edit("ace_editor_demo"); embedded_editor = ace.edit("embedded_ace_code"); - var javascriptMode = require("ace/mode/javascript").Mode; - var htmlMode = require("ace/mode/html").Mode; - editor.getSession().setMode(new javascriptMode()); - embedded_editor.getSession().setMode(new htmlMode()); + editor.getSession().setMode("ace/mode/javascript"); + editor.getSession().setMode("ace/mode/javascript"); + embedded_editor.getSession().setMode("ace/mode/html"); $("ul.menu-list li").click(function(e) { if (e.target.tagName === "LI") { diff --git a/index.html b/index.html index e1b27a1e..fbaad6ee 100644 --- a/index.html +++ b/index.html @@ -7,9 +7,7 @@ - - - + @@ -17,8 +15,6 @@ - - @@ -32,7 +28,7 @@

The high performance code editor for the web.

@@ -163,7 +159,7 @@ console.log(addResult); return x; }</div> -<script src="https://s3.amazonaws.com/ajaxorg/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> +<script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> <script> var editor = ace.edit("editor"); editor.setTheme("ace/theme/twilight"); @@ -194,10 +190,9 @@ console.log(addResult);

Setting the Programming Language Mode

By default, the editor supports plain text mode. All other language modes are available as separate modules, loaded on demand like this:

-
var javascriptMode = require("ace/mode/javascript").Mode;
-editor.getSession().setMode(new javascriptMode());
+
editor.getSession().setMode("ace/mode/javascript");
-

One Editor, Multiple Sessions

+

Common Operations

Set and get content: