0

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>

shibedibedah
  • 25
  • 1
  • 9

2 Answers2

0

Check this question: CSS data attribute new line character & pseudo-element content value

The same is going to work for you too.

Mario Plantosar
  • 804
  • 9
  • 24
  • Thanks for the answer, I've tried this and yet it still doesn't work. It just absorbs the element in the text and does absolutely nothing about it. The element also dissapears from the caption when I open the lightbox – shibedibedah Nov 14 '19 at 12:12
0

Found an answer to my problem. Added white-space:pre-wrap; to CSS and &#13; works as line breaker

shibedibedah
  • 25
  • 1
  • 9