Skip to content

Commit

Permalink
Update WysiwygWithMetadata.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kkarkus authored Mar 10, 2024
1 parent 71bad4a commit 2e8cc95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Document/Areabrick/WysiwygWithMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -68,6 +68,8 @@ public function action(Info $info): ?\Symfony\Component\HttpFoundation\Response
$html = $this->wysiwygService->addMetaToImages($html, $lang);

$tag->setDataFromResource($html);

return null;
}

/**
Expand Down

0 comments on commit 2e8cc95

Please sign in to comment.