WordPress Gutenberg editor changes my manually added HTML and thus destroys a WP Featherlight gallery feature

104 Views Asked by At

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?

0

There are 0 best solutions below