From 29357ae170ad3dc7cfaa9b87b468e7a2d912a1a2 Mon Sep 17 00:00:00 2001 From: onukura Date: Mon, 3 Aug 2020 00:50:01 +0900 Subject: [PATCH] Add theme choices for editor (#2501) --- .../gitbucket/core/repo/editor.scala.html | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/main/twirl/gitbucket/core/repo/editor.scala.html b/src/main/twirl/gitbucket/core/repo/editor.scala.html index 3c8089ef0..a97bc55ca 100644 --- a/src/main/twirl/gitbucket/core/repo/editor.scala.html +++ b/src/main/twirl/gitbucket/core/repo/editor.scala.html @@ -39,6 +39,48 @@ +
+ +
@@ -86,7 +128,11 @@ $(function(){ $('#editor').text($('#initial').val()); var editor = ace.edit("editor"); - editor.setTheme("ace/theme/monokai"); + editor.setTheme("ace/theme/" + $('#theme').val()); + + $('#theme').change(function(){ + editor.setTheme("ace/theme/" + $('#theme').val()); + }); if(localStorage.getItem('gitbucket:editor:wrap') == 'true'){ editor.getSession().setUseWrapMode(true);