1

On a page that shows a series of images (not a gallery) I did add the WP Featherlight plugin. Then I opened the page with this series of images in Gutenberg's code viw. As described in the docs, I added a link around every <img> tag and included the attribute data-featherlight="#mycustomgallery". After saving the page, the source code view in the browser shows that this attribute was changed to data-featherlight="image". I don't like when an editor changes my manual additions without a warning.

Does someone has an idea how I could keep the attribute data-featherlight="#mycustomgallery" in Gutenberg's code view?

Or, I can also change my question to: How can we show a a series of pictures as a featherlight lightbox that allows to user to watch the images also as a series of images in the same lightbox, and nt only every single image in that page?

  • Are you using the HTML Block? I would suggest if you are happy coding you could use shortcodes to make sure your code is not changed. Otherwise you can look here ( https://developer.wordpress.org/reference/functions/wp_kses_allowed_html/ ) to adjust what html tags and attributes you would like to allow. – Ryan Feb 08 '21 at 09:07

0 Answers0