lightbox icon indicating copy to clipboard operation
lightbox copied to clipboard

improve remote content docs

Open leviwheatcroft opened this issue 5 years ago • 0 comments

There's a few issues with the remote content docs and example.

Firstly, the source code shown in this section doesn't seem to relate to loading remote content.

Secondly, some explanation should be provided regarding the manner in which local vs remote content. Looking at the source I can see that local content is simply loaded into the lightbox with no iframe, but the docs imply that any content which is not an image or video will be wrapped in an iframe. In my case, this caused a lot of confusion and was difficult to narrow down.

In case anyone else runs into this, if page-a is loading content from page-b on the same server, the page-b content will not be wrapped in an iframe by default. In this case the scripts and styles from page-b will be injected into page-a which can cause unexpected behaviour. To force wrapping it in an iframe, you need to use the data-disable-external-check=true attribute.

leviwheatcroft avatar Apr 26 '19 21:04 leviwheatcroft