Search code examples
javascriptace-editor

how can I disable the syntax checker in ACE editor?


Hello I'm using the ACE editor and I would like to disable the syntax checker, I've found that removing the worker-javascript.js file seems to do the trick but I hope there's a cleaner way as I'm not sure what else I'm disabling or even breaking by removing that file.

Thanks.


Solution

  • I also didn't find this in documentation, so I've looked at ACE source code. You can disable worker with the following lines of code:

    var editor = ace.edit(document.getElementById('test'));
    editor.getSession().setUseWorker(false);