From 331989dfcd1da1dbf2b466a406e3255ee61adc19 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Fri, 5 Apr 2024 19:19:35 +0100 Subject: [PATCH] parse refs for front-end --- src/Field.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Field.php b/src/Field.php index 3d296143..bcbfbbcd 100644 --- a/src/Field.php +++ b/src/Field.php @@ -1007,6 +1007,11 @@ protected function prepValueForInput($value, ?ElementInterface $element, bool $s $value = $this->_prepNestedEntriesForDisplay($value, $element?->siteId, $static); } + // @see https://github.com/craftcms/ckeditor/issues/197 + if (!$this->isCpRequest()) { + $value = Craft::$app->getElements()->parseRefs($value, $element?->siteId); + } + return parent::prepValueForInput($value, $element); }