Add editor config option

Ref T677
This commit is contained in:
Matt Baer 2019-08-04 22:20:30 -04:00
parent 740282b7b7
commit f6a7dfacb9
2 changed files with 5 additions and 1 deletions

View file

@ -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"`

5
pad.go
View file

@ -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