Pregunta

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?

¿Fue útil?

Solución

It requires to connect javascript library in html page:

<script src="js/ace-0.2.0/src/mode-ruby.js"></script>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top