From 47b387921a4f0eabd74327bebcf138c7b95155cd Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 11 Feb 2026 20:55:46 +0100 Subject: [PATCH] Add code editor setting dropdowns (#36534) Adds three ` + {{svg "octicon-info"}} {{else}} {{$v}} diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index 008376ce16..8a5ed4a39c 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -18,19 +18,22 @@ {{if not .NotEditableReason}}
-
+ data-previewable-extensions="{{StringUtils.Join $.CodeEditorConfig.PreviewableExtensions ","}}" + data-line-wrap-extensions="{{StringUtils.Join $.CodeEditorConfig.LineWrapExtensions ","}}">{{.FileContent}}
diff --git a/templates/repo/editor/options.tmpl b/templates/repo/editor/options.tmpl new file mode 100644 index 0000000000..04cbd44cd6 --- /dev/null +++ b/templates/repo/editor/options.tmpl @@ -0,0 +1,30 @@ +{{$indentStyle := $.CodeEditorConfig.IndentStyle}} +{{$indentSize := or $.CodeEditorConfig.IndentSize 4}} +{{$lineWrapOn := $.CodeEditorConfig.LineWrapOn}} +
+
+ +
+
+ +
+
+ +
+
diff --git a/templates/repo/editor/patch.tmpl b/templates/repo/editor/patch.tmpl index 9b82bb855f..a70464dacb 100644 --- a/templates/repo/editor/patch.tmpl +++ b/templates/repo/editor/patch.tmpl @@ -20,15 +20,20 @@
-