From ec2b9fffdfaae3af520b4e03a87efa788bf53725 Mon Sep 17 00:00:00 2001 From: josdejong Date: Wed, 19 Feb 2014 20:34:41 +0100 Subject: [PATCH] Partly fix for #88: Indent mismatch --- jsoneditor/js/texteditor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsoneditor/js/texteditor.js b/jsoneditor/js/texteditor.js index 3ebd5b7..68dfe43 100644 --- a/jsoneditor/js/texteditor.js +++ b/jsoneditor/js/texteditor.js @@ -7,7 +7,7 @@ * "text" (default) * or "code". * {Number} indentation Number of indentation - * spaces. 4 by default. + * spaces. 2 by default. * {function} change Callback method * triggered on change * @param {JSON | String} [json] initial contents of the formatter @@ -121,6 +121,7 @@ TextEditor.prototype._create = function (container, options, json) { editor.setShowPrintMargin(false); editor.setFontSize(13); editor.getSession().setMode('ace/mode/json'); + editor.getSession().setTabSize(2); editor.getSession().setUseSoftTabs(true); editor.getSession().setUseWrapMode(true); this.editor = editor;