Create an iFrame plugin [Plugin development]

Hi!

I would like to create a very very simple plugin that will act as an iFrame to embed a button.
The goal is to have iFrame embed a page with an URL parameter that the user can set in the element property.

It seemed simpled but as it’s javascript and not HTML I’m completely stuck…
Any ideas?

Thanks :heart: & Merry Christmas!

I (almost!) did it but the dynamic value seems broken. My URL remains “undefined”.

Any ideas?

Have you enabled iFrames on your app?

Problem solved @johnny the issue was because I used the properties thing which is not available in the initialize part.

Here’s a step by step to do it:

1 . Display the iFrame

Under the update function of the element part of the editor plugin editor, you need to initialize the div that will hold the iFrame.
You have to replace HTML CODE with your code.

function(instance, properties, context) {

instance.canvas.append('HTML CODE')

}

Now the HTML div will initialize but you will still need to define the element style

1 Like