The essence of the problem is a project on zend framework 1, you need to connect the ace editor in it. When I try to connect it, I get this error:

> Uncaught SyntaxError: Unexpected token < theme-twilight.js:1 > UncaughtSyntaxError: Unexpected token < ace.js:1 > Uncaught Error: couldn't load module ace/theme/twilight or it didn't call define(…) 

I call him this way (as in the githaba demo)

 <pre id="editor">function foo(items) { var i; for (i = 0; i &lt; items.length; i++) { alert("Ace Rocks " + items[i]); } }</pre> <script src="/scripts/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> <script> var editor = ace.edit("editor"); editor.setTheme("ace/theme/twilight"); editor.session.setMode("ace/mode/javascript"); </script> 

The thing is that if this is just an ordinary page, then everything works fine when I try to call it specifically on this project, such a thing happens.

    1 answer 1

    He did not want to work on this path src = "/ scripts / src-noconflict / ace.js", although other scripts work fine on it, changed the path to such src = "/ public / scripts / src-noconflict / ace.js" and everything worked fine, very strange behavior