Give the homepage teaser a rich text editor
Replace the plain textarea for the homepage_teaser setting with the shared TipTap rich-text editor, and render the teaser as sanitized HTML in the portal hero's default layout. - SettingsAdmin: teaser field now uses RichTextEditor (lazy-loaded, code-split like PostEditor); rich fields render in a <div> wrapper instead of <label>. - HeroElement: text-block lines flagged `html` render sanitized HTML. - heroLayout: the default-layout teaser line is now an HTML line. - admin.controller: sanitize homepage_teaser against the body allowlist on save. - theme.css: collapse the teaser's nested block margins in the hero. Closes #48 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -546,6 +546,20 @@ button[disabled] {
|
||||
}
|
||||
|
||||
/* ===== Hero canvas editor ===== */
|
||||
/* Rich-text hero line (e.g. the homepage teaser). Inherits the line's font/color
|
||||
from its inline style; collapse the editor's outer block margins so spacing is
|
||||
driven by the line's own marginTop rather than a nested <p>. */
|
||||
.hero-rich > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.hero-rich > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.hero-rich a {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hero-el-editable {
|
||||
outline: 1px dashed rgba(127, 153, 189, 0.45);
|
||||
outline-offset: 2px;
|
||||
|
||||
Reference in New Issue
Block a user