Aloha,
I am trying to figure out how to override the video tag so that I can change the html from a <figure>
to a <div>
for better integration into my bootstrap design.
I created a plug with this code in it, but it seems to not work. I do not understand how this system works well enough to see what I am doing wrong in overriding the default tag behavior.
Kirby::plugin('jbeyerstedt/quote', [
'tags' => [
'quote' => [
'attr' => [
'author',
'class',
'cite'
],
'html' => function($tag) {
$html = '';
$class = $tag->class;
if ($tag->option('quote.default_style', 'none') == 'bs') {
$class .= ' blockquote';
}
$html .= '<blockquote class="' . $class . '">';
$class_p = '';
if ($tag->option('quote.default_style', 'none') == 'bs') {
$class_p .= ' mb-0';
}
$html .= '<p class="' . $class_p . '">'. $tag->value .'</p>';
if ($tag->author != '') {
$html .= '<footer class="blockquote-footer">' . $tag->author . '</footer>';
if ($tag->cite != '') {
$html .= '<cite>' . $tag->cite . '</cite>';
}
}
$html .= '</blockquote>';
return $html;
}
]
]
]);```