From f6a7dfacb956680c2036de81440038cb2f2e22bf Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Sun, 4 Aug 2019 22:20:30 -0400 Subject: [PATCH] Add editor config option Ref T677 --- config/config.go | 1 + pad.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 58486b0..f46282e 100644 --- a/config/config.go +++ b/config/config.go @@ -64,6 +64,7 @@ type ( // Site appearance Theme string `ini:"theme"` + Editor string `ini:"editor"` JSDisabled bool `ini:"disable_js"` WebFonts bool `ini:"webfonts"` Landing string `ini:"landing"` diff --git a/pad.go b/pad.go index 0057299..037a1f3 100644 --- a/pad.go +++ b/pad.go @@ -53,7 +53,10 @@ func handleViewPad(app *App, w http.ResponseWriter, r *http.Request) error { } } - padTmpl := "pad" + padTmpl := app.cfg.App.Editor + if padTmpl == "" { + padTmpl = "pad" + } if action == "" && slug == "" { // Not editing any post; simply render the Pad