Homepage teaser: rich text editor #51
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/homepage-teaser-rte"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #48.
The homepage teaser under Settings was a plain textarea. This gives it the shared rich-text editor and renders the teaser as sanitized HTML on the portal.
Changes
homepage_teaserfield now uses the sharedRichTextEditor(lazy-loaded so TipTap stays code-split, matchingPostEditor). Rich fields render in a<div>wrapper rather than a<label>so the editor's toolbar buttons / contenteditable aren't nested inside a label.htmlrender sanitized HTML (DOMPurify) instead of plain text; others are unchanged.tag: 'div',html: true). The teaser only appears in the portal's fallback hero (shown when no custom hero layout is published).homepage_teaseris sanitized against the same allowlist as post/wiki bodies (cleanBody) on save; the client re-sanitizes on render as defense in depth..hero-richcollapses the editor's outer block margins so hero spacing stays driven by the line's ownmarginTop.Verification
clientproduction build succeeds;RichTextEditorsplits back into its own chunk (main bundle no longer bloated).servertest suite: 142/142 pass.🤖 Generated with Claude Code