Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPaths for .setTheme/.setMode #1518
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ghost
Jul 15, 2013
Also, the workers, are they required for any languages, or is there an option to turn them off?
Again, found no solution to this in the docs.
ghost
commented
Jul 15, 2013
|
Also, the workers, are they required for any languages, or is there an option to turn them off? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ghost
Jul 15, 2013
After searching for a good while I found these two:
ace.config.set('basePath', '/libs/ace');
editor.getSession().setUseWorker(false);
ghost
commented
Jul 15, 2013
|
After searching for a good while I found these two:
|
p3lim
closed this
Jul 15, 2013
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Quixomatic
Mar 3, 2016
You are a hero, needed that basePath property and had been looking for days. Thank you.
Quixomatic
commented
Mar 3, 2016
|
You are a hero, needed that basePath property and had been looking for days. Thank you. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
joh-klein
Mar 9, 2016
For future reference, this is a complete example (modeled after the embedding example on the official ace website) for having ace.js somewhere else (I had it concatenated into a libs.min.js):
<script src="libs.min.js" type="text/javascript" charset="utf-8"></script>
<script>
ace.config.set('basePath', '/ace-builds/src-noconflict');
var editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/javascript");
</script>
joh-klein
commented
Mar 9, 2016
|
For future reference, this is a complete example (modeled after the embedding example on the official ace website) for having ace.js somewhere else (I had it concatenated into a libs.min.js): <script src="libs.min.js" type="text/javascript" charset="utf-8"></script>
<script>
ace.config.set('basePath', '/ace-builds/src-noconflict');
var editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/javascript");
</script> |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
efatsi
Aug 22, 2017
For anyone who struggles to get this to work in production environments, I've found that not only setting basePath, but also setting modePath and themePath are sometimes necessary for loading modes and themes:
ace.config.set('basePath', '/ace-builds/src-noconflict');
ace.config.set('modePath', '/ace-builds/src-noconflict');
ace.config.set('themePath', '/ace-builds/src-noconflict');
efatsi
commented
Aug 22, 2017
|
For anyone who struggles to get this to work in production environments, I've found that not only setting ace.config.set('basePath', '/ace-builds/src-noconflict');
ace.config.set('modePath', '/ace-builds/src-noconflict');
ace.config.set('themePath', '/ace-builds/src-noconflict'); |
ghost commentedJul 15, 2013
Running
editor.setTheme('libs/ace/theme/twilight')will look fortheme-twilight.jsin the root folder.I tried looking at the documentation without finding any help.