mizzao / meteor-sharejs

Meteor smart package for transparently adding ShareJS editors to an app
MIT License
225 stars 53 forks source link

Editor setTheme() #72

Closed vincentracine closed 8 years ago

vincentracine commented 8 years ago

Getting a strange error when trying to set the theme of the ace editor.

temp1.getTheme()
"ace/theme/monokai"
temp1.setTheme('ace/theme/chrome');
undefined

Causes:

Uncaught SyntaxError: Unexpected token <     theme-chrome.js:1
Uncaught TypeError: Cannot read property 'cssClass' of undefined      davidsichau_sharejs-ace.js?hash=b189fe0…:16224
edemaine commented 8 years ago

To me that sounds like your Meteor code is crashing -- check server logs? In that situation, everything loads as an HTML, hence the < token... Alternatively, perhaps your routes are preventing the static js load?

For what it's worth, setTheme works fine for me.