I have implemented an Ace editor setup for PHP (which is working fine), but when I try to set additional options using Ace's API, I receive warnings in the console.
Here is the code used to init the editor and try to set the options;
ace.require("ace/ext/language_tools");
ace.require("ace/ext/emmet");
// PHP
var phpeditor = ace.edit("php_inc");
phpeditor.setTheme("ace/theme/dreamweaver");
phpeditor.getSession().setMode("ace/mode/php");
phpeditor.setOptions({
enableSnippets: true,
enableLiveAutoComplete: true,
enableBasicAutocompletion: true,
showPrintMargin: settings.showPrintMargin,
useSoftTabs: false,
fontSize: settings.fontSize,
showInvisibles: settings.showInvisibles,
behavioursEnabled: settings.behavioursEnabled,
tabSize: settings.tabSize,
useWrapMode: settings.useWrapMode,
useWorker: settings.useWorker,
setHighlightActiveLine: false,
enableEmmet: true
});
And here are the console warnings I get;
misspelled option "enableSnippets" ace.js?ver=3.9.1:5207
misspelled option "enableLiveAutoComplete" ace.js?ver=3.9.1:5207
misspelled option "enableBasicAutocompletion" ace.js?ver=3.9.1:5207
misspelled option "setHighlightActiveLine" ace.js?ver=3.9.1:5207
misspelled option "enableEmmet" ace.js?ver=3.9.1:5207
Any help will be greatly appreciated.
"enableLiveAutocompletion"
instead of "enableLiveAutoComplete"
https://github.com/ajaxorg/ace/blob/v1.1.4/lib/ace/ext/language_tools.js#L186set
in them so it should be highlightActiveLine
you can see list of all available options by running Object.keys(editor.$options)