Files
sm-journal-plugin/field_types.go
Jakub Zych fbd1c85168 feat(admin): post content on the Blog Editor field type
- blogeditor and mlblogeditor field types (classes.BlogEditorTypes) on the
  plugin; post content is mlblogeditor with htmlColumn content_html
- Decode stores SanitizeHTMLReport output per locale with notices naming
  what was removed; clean HTML is stored byte for byte, nothing is refused
  because of markup
- Load serves HTML as stored and markdown posts as their content_html
- the admin hooks copy written content to content_html per locale without
  goldmark; untouched content leaves both columns as they are
- editor lang keys (en, pl plural notices), tracer smoke test, updated
  Postgres admin tests
2026-10-10 12:02:55 +02:00

22 lines
558 B
Go

package journal
import (
"git.golem15.com/golem15/sm-journal-plugin/classes"
"git.golem15.com/golem15/summercms/modules/backpack"
"git.golem15.com/golem15/summercms/modules/pact"
)
// FormFieldTypes registers the Blog Editor field types, blogeditor and
// mlblogeditor (classes.BlogEditorTypes), with a lazy accessor of the booted
// app.
func (p *Plugin) FormFieldTypes() []pact.FormFieldType {
return classes.BlogEditorTypes(func() *backpack.App {
if p == nil {
return nil
}
return p.app
})
}
var _ pact.HasFormFieldTypes = (*Plugin)(nil)