Little bit of the situation. I'm using Wordpress Magnific popup plugin and it takes the picture from media library. On the picture I have a title, alt and some caption, and when i enter it on my page then outside of the lightbox I get this code when inspecting it. The problem is that I can't get any html to work with it. I figured it must be because its inside tag. I'm wondering if theres a possibility to make it take html in it since i need to use the line breaks in it?
<figure> <a href="https://somepage.com/somepage/image.jpeg" data-rel="lightbox-gallery-1234" data-magnific_type="image" data-rl_title="Some Title" data-rl_caption="Caption for the picture and some more text" title="Some title"> <img src="https://somepage.com/somepage/image.jpeg" data-link="https://somepage.com/somepage/image.jpeg"> </a></figure>
Found an answer to my problem. Added
white-space:pre-wrap;
to CSS and
works as line breaker