From 847ec04cff95d4405303aa8a2f982183125eb67c Mon Sep 17 00:00:00 2001 From: DewGew Date: Tue, 3 Dec 2019 13:32:41 +0100 Subject: [PATCH] Code Editor Tab key insert spaces instead of a tab --- const.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/const.py b/const.py index dcaeee65..c6730511 100644 --- a/const.py +++ b/const.py @@ -2,7 +2,7 @@ from helpers import configuration """Constants for Google Assistant.""" -VERSION = '1.3.3' +VERSION = '1.3.4' PUBLIC_URL = 'https://[YOUR REVERSE PROXY URL]' HOMEGRAPH_URL = 'https://homegraph.googleapis.com/' REQUEST_SYNC_BASE_URL = HOMEGRAPH_URL + 'v1/devices:requestSync' @@ -512,6 +512,12 @@ mode: "yaml", autoRefresh:true }}); + editor.setOption("extraKeys", {{ + Tab: function(cm) {{ + var spaces = Array(cm.getOption("indentUnit") + 1).join(" "); + cm.replaceSelection(spaces); + }} + }}); editor.on("change", function() {{ textTosave = editor.getValue(); document.getElementById("save").value = textTosave;