OK, so it seems the general consensus is iframes is the way to go? I have updated the file, using only iframes within the Custom Deck to display content from DeckA and DeckB, with some interesting results… at least for me
To make things easier I am using rectangles to contain the iframe instead of the widget. I gave them a class “embed” and added some additional HTML attributes (for now just called “page” and deck") in order for it to be easy to use, just inputting from which deck and which slide I want to insert.
Then I call this function on scene load on the first Custom Deck scene:
var embeds = document.querySelectorAll(".embed");
for ( i=0; i < embeds.length; i++)
{
var deck = embeds[i].getAttribute('deck');
var page = embeds[i].getAttribute('page');
embeds[i].innerHTML = '<iframe frameborder="0" style="width:100%;height:100%;border:none" allowfullscreen="true" src="https://www.plughole.com/'+ deck +'ForumExample.html#'+ deck +'_'+ page +'"></iframe>';
}
I suppose further down the line I could have “base URL” etc as additional attributes, but I understand that data-* data attributes is the way to go… except I couldn’t get that to work. A Complete Guide to Data Attributes @MaxZieb
Anyway, the behaviour is a bit strange, in that you have to go to the very end of the slidedeck and then back again in order for any of the iframes to load. After that, everything appears as expected. So I’m probably calling the function in the wrong place/order.
The light/dark mode toggle works really well, except that the #DarkMode and #LightMode behaviours have to be added to every scene of DeckA and DeckB in order to work. Which is fine as they are just duplicate scenes. Of course if you go to the first slide of Custom Deck the iframes function gets called again and they get reset.
Anyway, update here, as before: https://www.plughole.com/CustomDeckForumExample.html
And here are the updated files if anyone wants to look: PresentationForumTest.zip (488.6 KB)
Cheers