I’ve got an HTML element I’m using to embed an external email editor. I can build the additional functions it lets me do within the HTML element itself, but was wondering how I can call on those functions outside of the HTML element?
For eg. I want to invoke the saveTemplate function on button click but if I try invoking it comes up with unlayer is not defined etc.
Things to note: I’ve got Toolbox installed but still no idea how I can get it to invoke the function outside of the HTML element.
I know I can render a button(using HTML) inside the HTML element and have the script run from there, but would like to minimize the amount of code I type as much as possible.
What sort of problems does it have that the iframe fixes? Could it be a clash of css class names between the library and Bubble? You could look into overriding Bubble styles with !important, or renaming the library’s classes.
iframe javascripteriffic
Yes, there are workarounds for the separation that the iframe gives.
I reverted it back just now but it’s not showing the error I had before. It was a fair few cloudfront errors when I had tested it. Now it doesn’t show any errors, but it still doesn’t display anything if that iframe option is unticked.
This worked like a charm! Thank you so much!
I had done so much googling and nearly gotten there. I think last I had tried was document.getElementById('myHTML').contentWindow.saveTemplate()
but looks like I was missing that firstElementChild, so thank you, I would never have tried that out by my own.