Forum Academy Marketplace Showcase Pricing Features

Instance.canvas & instance.object

Hi, I’m in the process of creating my first bubble.io plugin.

I understand what properties relate to, however not certain where instances come into play. So far, I understand that it is an object available across all functions.

Can anyone shine some light on the subject?

Thanks

It’s only available within element actions :slightly_smiling_face:

Hi Vini, to understand how. Can you suggest some console.log’s which help? Thanks

Use case 1

Append some html to the screen

Let box =  '<div></div>'
Instance.canvas.append(box)

Click the show/hide documentation link in the plugin editor to see additional info…

So the instance object contains attributes and methods which pertain to the visual element being built / implemented. (Ironically, though, many plugin elements are “faceless” and don’t actually render anything visible on screen; but they need to exist on the page in order to work their client-side “magic”.)

If you haven’t done so already, it might be helpful to read through the relevant documentation.

-Steve

Do you know where the id would go? #

I suppose it depends on your need as to where you’d place an element I’d, either when it’s created or dynamically after creation later on?

Would you like to peer into my personal plugin toolbox? You could see examples of how these are used.

I have limited examples, nothing crazy or comples