Hello @mad,
thank you so much for this lovely CMS! Keep up the good work! 😍
I wanted to ask you about something and I think the solution is somehow deeper in the system.
What I want to achieve:
I'm an artist and I want to show my works with captions (title, year, materials, size and sometimes a short (3 sentences) explanation). I put these informations into the "file caption" field.
I'm using the gallery-block in masonry-style and I managed to edit the "Gallery.php" -> \automad\src\Blocks\ at line 164 like this:
`foreach ($files as $file) {
$Image = new Image($file, 2 * $pixelWidth);
// $caption = Str::stripTags(FileUtils::caption($file));
$caption = FileUtils::caption($file);
$file = Str::stripStart($file, AM_BASE_DIR);
$span = round($Image->height / ($masonryRowHeight * 2));
$html .= <<< HTML
<div
class="am-gallery-masonry-item"
style="--am-gallery-masonry-rows: $span;"
>
<a href="$file" class="am-gallery-img-small" data-caption="$caption" data-am-block-lightbox>
<img src="$Image->file" />
<span>$caption</span>
</a>
</div>
HTML;`
With this "hack" I'm first allowing to use html elements like <br> or <b>
and then I insert the caption below the images.
Is there a way to use all text-editor functions from the text-block in the image/file caption editor?
all the best
evij