From 23a29ced75ef0413053ca0e892e403d376bbda73 Mon Sep 17 00:00:00 2001 From: Kamil Date: Sun, 10 Mar 2024 21:13:24 +0100 Subject: [PATCH] Update WysiwygWithMetadata.php (#47) --- src/Document/Areabrick/WysiwygWithMetadata.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Document/Areabrick/WysiwygWithMetadata.php b/src/Document/Areabrick/WysiwygWithMetadata.php index e65e15b..630db60 100644 --- a/src/Document/Areabrick/WysiwygWithMetadata.php +++ b/src/Document/Areabrick/WysiwygWithMetadata.php @@ -3,7 +3,7 @@ namespace PimcoreDevkitBundle\Document\Areabrick; use Pimcore\Model\Document\Editable\Area\Info; -use Pimcore\Model\Document\Tag; +use Pimcore\Model\Document\Editable\Wysiwyg; use PimcoreDevkitBundle\Service\Wysiwyg\WysiwygService; use Pimcore\Extension\Document\Areabrick\AbstractTemplateAreabrick; use Pimcore\Model\Asset; @@ -57,7 +57,7 @@ public function action(Info $info): ?\Symfony\Component\HttpFoundation\Response $lang = $info->getDocument()->getProperty("language"); $tag = $this->getDocumentEditable($info->getDocument(), self::TAG_TYPE, self::TAG_NAME); - if (!$tag instanceof Tag) { + if (!$tag instanceof Wysiwyg) { return null; } $html = $tag->getData(); @@ -68,6 +68,8 @@ public function action(Info $info): ?\Symfony\Component\HttpFoundation\Response $html = $this->wysiwygService->addMetaToImages($html, $lang); $tag->setDataFromResource($html); + + return null; } /**