Verlinke interne Seiten und Sprungmarken auch im formatierten Text der Website

Neues Werkzeug neben dem freien Link in Fließtext, Überschrift-Einleitung und Bild-Text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-27 07:03:17 +01:00
1 parent 6172364bf8
commit 6b43fbb7d1
5 files changed
+186 -2

No files matched your search

+3 -1
View File
@@ -34,6 +34,8 @@ public static function make(string $name, ?string $label = null, bool $live = tr
$toolbar = FormattedText::TOOLBAR;
if ($website) {
// Interne Seite oder Sprungmarke verlinken, gleich neben dem freien Link.
$toolbar[0] = [...$toolbar[0], 'interneSeite'];
array_splice($toolbar, 1, 0, [['fontSize', 'textColor'], ['alignStart', 'alignCenter', 'alignEnd']]);
}
@@ -45,7 +47,7 @@ public static function make(string $name, ?string $label = null, bool $live = tr
if ($website) {
$field
->plugins([new FontSizePlugin])
->plugins([new FontSizePlugin, new InternalLinkPlugin])
->textColors(Arr::mapWithKeys(
FormattedText::SITE_COLORS,
fn (string $label, string $key): array => [$key => TextColor::make($label, self::SITE_COLOR_VALUES[$key])],