I would like to build a custom audio and video tag to allow the user to add bold or italic inside captions. Some plugins here and there doesn’t have this function. I’ve followed some topics but this one I have made is deletting some part of my text article for no reasons…
Ideally, this little plugin would wrap the video/audio inside <figure> and caption inside
Do you know how can I fix it ? Thx
Thanks for the reply but I don’t know how to return a single html element based on my code. I have a low level in programming PHP. Is there any example somewhere I can be inspired ?
Everything is working properly on local, but when I send this plugin to the server, I get blank page with pages that doesn’t have video tag on their content…Do you know where does it come from ?
Note : I’ve used kt(escape::html($caption)) to get italic and bold into captions.
No, no idea why it fails on those pages, but check your server and php error logs.
On a side note, I’d only render the figure if $url is not empty. And your code as it is will also render an empty figcaption if $audiocaption is empty.