Search code examples
javascriptace-editor

how do I disable auto indenting and code completion in ace editor


When you type <div> and press enter on the standard ace editor (in html mode) it automatically creates a closing div tag and indents the cursor. You can see it here.

They have disabled it for the kitchen sink which is what I am after.

Is their a simple property setting like

editor.autoIndent = false;
editor.autoComplete = false;

Solution

  • you can use editor.setBehavioursEnabled(false) https://github.com/ajaxorg/ace/blob/master/demo/kitchen-sink/demo.js#L353