我通过 bower 加载了ace,我可以创建一个编辑器就好了。但是,我似乎无法设置主题和语言模式。这些是我的包含行:
script(src='components/ace-builds/src/ace.js')
script(src='components/ace-builds/src/mode-xml.js')
script(src='components/ace-builds/src/theme-solarized_light.js')
这是我的错误:
Uncaught TypeError: Cannot read property 'cssText' of null ace.js:12316
afterLoad ace.js:12316
(anonymous function) ace.js:12307
_require ace.js:94
req ace.js:152
(anonymous function) ace.js:12303
Uncaught TypeError: Cannot read property 'Mode' of null ace.js:5309
done ace.js:5309
_require ace.js:94
req ace.js:152
(anonymous function) ace.js:5302