diff --git a/Readme.md b/Readme.md index 5e9e3107..7b1c2803 100644 --- a/Readme.md +++ b/Readme.md @@ -112,7 +112,7 @@ Or using Node.JS The editor can then be opened at http://localhost:8888/kitchen-sink.html. -To open the editor with a file:/// URL see [the wiki](https://github.com/ajaxorg/ace/wiki/Running-Ace-from-a-file:). +To open the editor with a file:/// URL see [the wiki](https://github.com/ajaxorg/ace/wiki/Running-Ace-from-file). Building Ace ----------- diff --git a/doc/site/js/main.js b/doc/site/js/main.js index f266b7d3..f4d2f951 100644 --- a/doc/site/js/main.js +++ b/doc/site/js/main.js @@ -9,6 +9,29 @@ $(function() { editor.session.setMode("ace/mode/javascript"); editor.session.setMode("ace/mode/javascript"); embedded_editor.session.setMode("ace/mode/html"); + + 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); + editor.setOption("enableEmmet", true); + }); + + embedded_editor.setOptions({ + enableSnippets: true, + enableBasicAutocompletion: true + }); + }); + + ace.config.loadModule("ace/ext/language_tools", function() { + embedded_editor.setOptions({ + enableSnippets: true, + enableBasicAutocompletion: true + }); + editor.setOptions({ + enableSnippets: true, + enableBasicAutocompletion: true + }); + }); embedded_editor.setAutoScrollEditorIntoView(true); editor.setAutoScrollEditorIntoView(true);