How to Create Plugin to Modify Page Builder

I am trying to add more functionality to the page builder in the Admin App. I want to be able to add an iframe option. The problem I have is there is not much documentation on how to add a plugin that adds functionality in page builder.

Hi @JCravinho, at the moment our documentation lacks articles on many fronts, so I can give you references to our GH, where you can find how all existing elements work.

Everything is a plugin, so your custom plugin would be no different.
Here you’ll find all the existing element plugins: https://github.com/webiny/webiny-js/tree/master/packages/app-page-builder/src/editor/plugins/elements
These are editor plugins, meaning these work inside of an Editor.

And their counterpart are render plugins, which render those elements when you open your site, or render preview in the administration:
https://github.com/webiny/webiny-js/tree/master/packages/app-page-builder/src/render/plugins/elements
so they always go in pairs, 1 editor plugins + 1 render plugin for the same element you’re creating.

Hopefully this will get you started, and please feel free to ask for help along the way if you get stuck, so I can give you more references.

Unfortunately we’re overwhelmed by things in our pipeline, and we don’t have enough resources to dedicate to docs, but it is something we’ll be working on in the near future.

Cheers!

Would I add both the editor and render plugin to the apps/admin/src/plugins? Or does editor go in admin and render go in site?

In admin app you add both editor and render plugins, and in site app you only add render plugins.

When you are on the Pages list view, and can click through the pages, there is a page preview rendered on the right side of the screen - that’s where render plugins are used.