From 63614b6f50f5e8c445580882b6c81c275a6f8bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rory=20O=E2=80=99Kane?= Date: Fri, 21 Jun 2013 22:20:25 -0300 Subject: [PATCH] Set tab size in text editor to match default HTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default HTML in a new site’s `index.html` and `not_found.html` has 2-space indents. Setting the editor to match that makes the page easier to edit, because the user can use the Tab key for indentation. This change is untested. The API call was copied from https://github.com/ajaxorg/ace/wiki/Embedding-API. --- views/site_files/text_editor.slim | 1 + 1 file changed, 1 insertion(+) diff --git a/views/site_files/text_editor.slim b/views/site_files/text_editor.slim index 42fcf254..457848f9 100644 --- a/views/site_files/text_editor.slim +++ b/views/site_files/text_editor.slim @@ -114,6 +114,7 @@ javascript: editor = ace.edit("editor"); setTheme(); editor.getSession().setMode("ace/mode/html"); + editor.getSession().setTabSize(2); editor.setFontSize(14); editor.setShowPrintMargin(false); });