Add editor config option

Ref T677
pull/153/head
Matt Baer 5 years ago
parent 740282b7b7
commit f6a7dfacb9
  1. 1
      config/config.go
  2. 5
      pad.go

@ -64,6 +64,7 @@ type (
// Site appearance // Site appearance
Theme string `ini:"theme"` Theme string `ini:"theme"`
Editor string `ini:"editor"`
JSDisabled bool `ini:"disable_js"` JSDisabled bool `ini:"disable_js"`
WebFonts bool `ini:"webfonts"` WebFonts bool `ini:"webfonts"`
Landing string `ini:"landing"` Landing string `ini:"landing"`

@ -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 == "" { if action == "" && slug == "" {
// Not editing any post; simply render the Pad // Not editing any post; simply render the Pad

Loading…
Cancel
Save