wollardj / meteor-reactive-ace

Easily include ace, receive reactive varibles for cursor position, editor contents, etc. Inspired by Madeye's reactive-ace project but updated for Meteor 0.9.1
4 stars 2 forks source link

How is one supposed to set the editor's theme and mode? #2

Open aknuds1 opened 9 years ago

aknuds1 commented 9 years ago

I know you can call setTheme and setMode to set theme and mode, but how are you supposed to call them in your application? Calling them won't work (although silently) before the mandrill_ace template is rendered, in my experience.

I also have this problem that Ace tries to load the files from the server, f.ex. http://localhost:3000/theme-monokai.js. Any idea as to why this is?

aknuds1 commented 9 years ago

I found that for setTheme/setMode to work, I had to refer to the theme/mode names with their full module names, e.g. 'ace/theme/monokai' and 'ace/mode/markdown'.