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

@ -3,7 +3,7 @@
<div class="text-center max-w-2xl mx-auto">
<h2 class="text-section-title">{!! $content['title'] ?? '' !!}</h2>
@if (!empty($content['text']))
<p class="text-large text-muted-foreground leading-relaxed mt-4">{{ $content['text'] }}</p>
<p class="text-large text-muted-foreground leading-relaxed mt-4">{!! cms_inline($content['text'] ?? '') !!}</p>
@endif
</div>
@ -27,7 +27,7 @@
<p class="text-xs uppercase tracking-wider text-clay mt-1">{{ $project['meta'] }}</p>
@endif
@if (!empty($project['description']))
<p class="text-sm text-muted-foreground leading-relaxed mt-2">{{ $project['description'] }}</p>
<p class="text-sm text-muted-foreground leading-relaxed mt-2">{!! cms_inline($project['description'] ?? '') !!}</p>
@endif
@if (!empty($project['gallery']))
{{-- Weitere Bilder der Referenz als kleine Reihe --}}