How to implement a <figure> block
nvayalil opened this issue · 5 comments
Hi,
I wish to have a HTML 5
<figure>
<img src="pic_trulli.jpg" alt="Trulli" style="width:100%">
<figcaption>Fig.1 - Trulli, Puglia, Italy.</figcaption>
</figure>
Is there a implementation for this? If not, please provide some helps.
It is possible via extension.
I checked the wiki, but no examples for how to add new tags like the above. Probably, I need to follow "Add Multi-Line Element" in the wiki. But where I add this extension when I am using a framework such as Laravel?
With the extension you could simply write a regular image syntax with a paragraph below it indented by a space, and it will becomes a <figure>
element automatically:
![alt text](image-url.jpg) {style="width:100%"}
This is an image caption.
But where I add this extension when I am using a framework such as Laravel?
Using composer require taufik-nurrohman/parsedown-extra-plugin
, and do something like echo app(ParsedownExtraPlugin::class)->text('asdf')
?
Sorry for the delay, but my aim to use alt text as caption as well, In this case, should I override the parent inlineImage or create a new blockImage function?