diff --git a/doc/site/js/main.js b/doc/site/js/main.js index ed9fbff4..7e564fbf 100644 --- a/doc/site/js/main.js +++ b/doc/site/js/main.js @@ -6,10 +6,13 @@ $(function() { editor.container.style.opacity = ""; embedded_editor = ace.edit("embedded_ace_code"); embedded_editor.container.style.opacity = ""; - editor.session.setMode("ace/mode/javascript"); - editor.session.setMode("ace/mode/javascript"); + editor.session.setMode("ace/mode/javascript"); embedded_editor.session.setMode("ace/mode/html"); + editor.setOptions({ + maxLines: 30 + }) + ace.config.loadModule("ace/ext/emmet", function() { ace.require("ace/lib/net").loadScript("http://nightwing.github.io/emmet-core/emmet.js", function() { embedded_editor.setOption("enableEmmet", true); diff --git a/index.html b/index.html index 75504169..f61b619a 100644 --- a/index.html +++ b/index.html @@ -80,7 +80,7 @@ function add(x, y) { var addResult = add(3, 2); console.log(addResult); - +

Looking for a more full-featured demo? Check out the kitchen sink. diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index 8f321800..2500bd9a 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -90,7 +90,7 @@ var Autocomplete = function() { this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); this.editor.off("changeSelection", this.changeListener); this.editor.off("blur", this.changeListener); - this.editor.off("mousedown", this.changeListener); + this.editor.off("mousedown", this.mousedownListener); this.editor.off("mousewheel", this.mousewheelListener); this.changeTimer.cancel(); diff --git a/lib/ace/config.js b/lib/ace/config.js index eb3de049..703b1c7f 100644 --- a/lib/ace/config.js +++ b/lib/ace/config.js @@ -217,8 +217,11 @@ var optionsProvider = { if (this["$" + name] === value) return; var opt = this.$options[name]; - if (!opt) + if (!opt) { + if (typeof console != "undefined" && console.error) + console.error('misspelled option "' + name + '"'); return undefined; + } if (opt.forwardTo) return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value); @@ -229,8 +232,11 @@ var optionsProvider = { }, getOption: function(name) { var opt = this.$options[name]; - if (!opt) + if (!opt) { + if (typeof console != "undefined" && console.error) + console.error('misspelled option "' + name + '"'); return undefined; + } if (opt.forwardTo) return this[opt.forwardTo] && this[opt.forwardTo].getOption(name); return opt && opt.get ? opt.get.call(this) : this["$" + name];