I am trying to use the Ace code editor library (http://ace.ajax.org/), but im having trouble. According to the embedding guide, this should load the required js files from Amazo
I faced trouble when trying to get this done. The code given in ACE homepage didn't work for me. I had all my files in local directory, but you can use a CDN instead if you want.
I placed the ace directory from lib/ace
into my static/
directory. Change that part to your own location.
I had to use Require.js api to load ace. This is the code that worked for me :
ACE in Action
function foo(items) {
var x = "All this is syntax highlighted";
return x;
}
Source: https://github.com/ajaxorg/ace/issues/1017
Checkout this page if you get some crazy errors: http://requirejs.org/docs/errors.html