CMS: Absatz-Tags aus dem Rich-Text-Editor erscheinen nicht mehr als Text

Der Editor packt eingefügten Text in <p>; Felder wie die FAQ-Antwort gibt die Website als Text
aus, die Tags waren sichtbar. Beim Speichern entfernt unwrapParagraphs() die Absätze (ein
Absatz ohne <p>, mehrere mit <br><br>, Blockinhalte unverändert). cms_inline() gibt die
Felder als bereinigtes Inline-HTML aus – auch schon gespeicherte Texte mit <p> erscheinen
sauber, Fett und Hervorhebung werden dargestellt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-10-12 06:58:48 +00:00
parent 07816dce19
commit 451e738c8b
20 changed files with 147 additions and 23 deletions

View file

@ -8,7 +8,7 @@
<div class="lg:col-span-3 slide-right delay-200">
<x-web.hero-eyebrow :text="$content['eyebrow'] ?? null" class="mb-6" />
<h1 class="text-hero-alt">{!! $content['title'] ?? '' !!}</h1>
<p class="text-large text-muted-foreground leading-relaxed mt-6">{{ $content['text'] ?? '' }}</p>
<p class="text-large text-muted-foreground leading-relaxed mt-6">{!! cms_inline($content['text'] ?? '') !!}</p>
<x-web.hero-trust :items="$content['stats'] ?? []" class="mt-8" />
</div>
@ -23,7 +23,7 @@
<div class="max-w-3xl slide-right delay-200">
<x-web.hero-eyebrow :text="$content['eyebrow'] ?? null" class="mb-6" />
<h1 class="text-hero-alt">{!! $content['title'] ?? '' !!}</h1>
<p class="text-large text-muted-foreground leading-relaxed mt-6">{{ $content['text'] ?? '' }}</p>
<p class="text-large text-muted-foreground leading-relaxed mt-6">{!! cms_inline($content['text'] ?? '') !!}</p>
<x-web.hero-trust :items="$content['stats'] ?? []" class="mt-8" />
</div>
@endif