New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paths for .setTheme/.setMode #1518
Comments
Also, the workers, are they required for any languages, or is there an option to turn them off? |
After searching for a good while I found these two:
|
You are a hero, needed that basePath property and had been looking for days. Thank you. |
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> |
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'); |
@efatsi Can u please share with me how can we do it angular 6 project with https://github.com/fxmontigny/ng2-ace-editor . I am also facing the same issue. |
Sorry @PrabakarKaruppasamy, I don't have any angular experience. good luck! |
@PrabakarKaruppasamy - were you able to make it work mate? Any change you could look at https://stackoverflow.com/questions/60177855/theme-and-mode-path-infer-issue-with-ace-js-and-angular |
Running
editor.setTheme('libs/ace/theme/twilight')
will look fortheme-twilight.js
in the root folder.I tried looking at the documentation without finding any help.
The text was updated successfully, but these errors were encountered: