midzer / tobii

An accessible, open-source lightbox with no dependencies
https://midzer.github.io/tobii/demo/
MIT License
196 stars 20 forks source link

Change captionText to use innerHTML instead of textContent #88

Closed mbabini closed 1 year ago

mbabini commented 2 years ago

Hi

It would be great if the output of the captionText function could contain HTML code like line breaks or links.

I suggest the following change: original: this.userSettings.captionText?r.textContent=this.userSettings.captionText(e)

new: this.userSettings.captionText?r.innerHTML=this.userSettings.captionText(e)

Thank you!

viliusle commented 2 years ago

This can be done easily, of course needs some testing.

midzer commented 2 years ago

We could try it in develop branch.

@mbabini Do you mind opening a PR for this?

mbabini commented 2 years ago

@midzer I've tried: https://github.com/midzer/tobii/pull/92 But please check because it's my very first PR... ;-)

midzer commented 1 year ago

Should by done by https://github.com/midzer/tobii/commit/b43119e8471c8424ad32757f85a472b9d29259a4