Question

I can set language modes for javascript, css, html, json by this construction:

var JavaScriptMode = require("ace/mode/javascript").Mode;
editor.getSession().setMode(new JavaScriptMode());

But I can't set language modes for ruby, java and maybe for another languages.

In my project I have a folder with ace's files like these:

mode-javascript.js
mode-html.js
mode-css.js
mode-json.js
mode-java.js
mode-ruby.js
...

I assume that these files used to set language mode but why it possible for some languages but not for another languages?

Was it helpful?

Solution

It requires to connect javascript library in html page:

<script src="js/ace-0.2.0/src/mode-ruby.js"></script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top