
<div class="posts block-preview richeditor-block">
<?php
    $live = $model;

    if ($live && !empty($live->content) && !empty($live->image)) {
        $blockData = Dynamedia\Posts\Classes\Body\Repeaterbody\Blocks\RicheditorBlock::makePreviewBlock(
            $live->content,
            $live->image
        );
    } else {
        $blockData = Dynamedia\Posts\Classes\Body\Repeaterbody\RepeaterBody::getBlockFromRepeater($model, $field);
    }

    if ($blockData) {
        $renderer = new Dynamedia\Posts\Classes\Body\Repeaterbody\Blocks\RicheditorBlock($blockData);
        echo $renderer->getHtml();
    }
?>
</div>
