Editing Lightbox Captions to include HTML

I’m trying to add a bit more functionality to the current captions in the webflow lightbox. As it is, no html can be included in the caption area, so you can’t achieve linebreaks, bold formatting, italics, links, etc. Does any one have any ideas?

I’m not very knowledgeable with javascript, but it looks like the webflow.js file only references the captions here:

    $figure.append(addClass($html, 'embed'));
  }

  if (item.caption) {
    $figure.append(dom('caption', 'figcaption').text(item.caption));
  }

I’m curious if there’s a way in the html to dynamically link to a separate file that contains html for a more robust caption?

            "items": [
              {
                "type": "image",
                "url": "/images/example.jpg",
                "caption": "LINK TO SEPARATE HTML FILE HERE?",
                "width": 725,
                "height": 725
              },
1 Like