We’ve just released a new feature that allows plugins to be rendered in the editor. Up to now, user-written plugins have been represented by a static placeholder image in the editor, but going forward they will be able to work in the editor just as native Bubble elements do.
To take advantage of this new functionality, plugin developers should write a “preview” function in the elements tab of the plugin editor. The preview function is essentially a rehashing of the “initialize” or “update” function, simplified so as to be compatible with the more minimalist context of the editor. Two parameters are provided, instance and properties, exposing the canvas, setHeight function (responsive mode only), element dimensions, and any properties the user has supplied. In most cases, you should be able to reuse your runmode code with a few alterations.
Your plugin will then render itself in the editor, sizing itself correctly. Placeholder images will still be displayed for existing plugins until a preview function is specified.
As always, your feedback/bug reports/feature requests/thoughts are welcome, and thank you for developing plugins for our platform!