feat(editor): blog editor element with exact untouched value
- golem15-journal-blogeditor (BlogEditorElement): light-DOM element with a TipTap WYSIWYG tab and a Source tab that edits the exact HTML string - The value is the exact served string until a user edit; external values go in with emitUpdate false; summer-change fires on user edits only and an echo set is a no-op - StarterKit without the trailing node, links without target, rel or class; injectCSS false with the ProseMirror base rules in blogeditor.css under the element tag, colours from --c-* only - Committed bundle embedded through admin.go; vitest smoke on an imported post fixture (footer, style block, spans, figure, table, entities)
This commit is contained in:
@@ -98,6 +98,16 @@ func TestJournalSVGEmbed(t *testing.T) {
|
||||
t.Fatalf("AdminFS missing journal-icon.svg: %v", err)
|
||||
}
|
||||
_ = f.Close()
|
||||
bundle, err := fs.ReadFile(fsys, "assets/dist/blogeditor.js")
|
||||
if err != nil {
|
||||
t.Fatalf("AdminFS missing the Blog Editor bundle: %v", err)
|
||||
}
|
||||
if !strings.Contains(string(bundle), "golem15-journal-blogeditor") {
|
||||
t.Fatal("blogeditor.js does not define golem15-journal-blogeditor")
|
||||
}
|
||||
if _, err := fs.Stat(fsys, "assets/dist/blogeditor.css"); err != nil {
|
||||
t.Fatalf("AdminFS missing blogeditor.css: %v", err)
|
||||
}
|
||||
filter, err := fs.ReadFile(fsys, "controllers/posts/config_filter.yaml")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user