Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
163
rated 0 times [  164] [ 1]  / answers: 1 / hits: 24787  / 12 Years ago, mon, june 4, 2012, 12:00:00

I'm trying to add the ace editor to my app. I downloaded it from github, dropped the ace/lib/ace directory into my app's directory, included:



<script src=ace/lib/ace/ace.js type=text/javascript charset=utf-8></script>


in my body tag and:



editor = ace.edit editor


in my script tag. I've tried to load the page in Chrome and Firefox and I get define is not defined in ace.js:46. The line in ace.js is:



define(function(require, exports, module) {


Does anyone know why ace is expecting the define() function to exist and why it's not finding it? Here's my source:



<html>
<body>
<div id=editor>some text</div>
<script src=ace/lib/ace/ace.js type=text/javascript charset=utf-8></script>
<script>
var editor = ace.edit(editor);
</script>
</body>
</html>

More From » ace-editor

 Answers
3

If you already have the source, then it is pretty easy to do still. Just go in the directory where you copied all the ace source.



Then, do:



npm install
node Makefile.dryice.js


See the wiki for additional details
https://github.com/ajaxorg/ace/wiki/Building-ace


[#85165] Saturday, June 2, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
isaacvalentinn

Total Points: 325
Total Questions: 120
Total Answers: 131

Location: North Korea
Member since Tue, Jun 16, 2020
4 Years ago
isaacvalentinn questions
Mon, Jan 18, 21, 00:00, 3 Years ago
Mon, Nov 23, 20, 00:00, 4 Years ago
Wed, Sep 23, 20, 00:00, 4 Years ago
;