我想禁用语法检查器,因为我的编辑器是部分 html 编辑器。
我找到了两种方法来实现这一点,但我需要访问编辑器实例或模式原型
http://stackoverflow.com/a/13016089/729454
https://groups.google.com/forum/?fromgroups=#!topic/ace -discuss/bOovWtXhtdE
实现这一目标的任何建议?
我找到了一种方法来获取对编辑器实例的引用
https://github.com/securingsincity/react-ace/issues/65
对于正在寻找这个的其他人,这是一个有效的 ES6 代码示例:
<AceEditor
mode="css"
theme="github"
onLoad={(editor) => {
editor.getSession().setUseWorker(false)
}}
/>
这也有效
setOptions={{useWorker: false}}
最有用的评论
168
这也有效