From 52ccfab122d857dafafa5c8adc9f1584f39f9071 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 3 Oct 2012 16:19:04 -0400 Subject: [PATCH] Now when you hit the TAB key in codemirror, it will insert 4 spaces. --- common/lib/capa/capa/templates/textbox.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/templates/textbox.html b/common/lib/capa/capa/templates/textbox.html index 271d7795e0..91aa6d41c8 100644 --- a/common/lib/capa/capa/templates/textbox.html +++ b/common/lib/capa/capa/templates/textbox.html @@ -42,7 +42,12 @@ lineWrapping: true, indentUnit: "${tabsize}", tabSize: "${tabsize}", - indentWithTabs: true, + indentWithTabs: false, + extraKeys: { + "Tab": function(cm) { + cm.replaceSelection("${' '*tabsize}", "end"); + } + }, smartIndent: false }); });