Hi
I’m busy creating a slider plugin and I’d like to be able to offer users the ability to create their slide content with SiteOrigin’s Page Builder interface. I’m just wondering if there’s a simple-ish way to attach an instance of Page Builder to WordPress’s WYSIWYG editor which I’m creating with the wp_editor function?
Thanks
Hi Outtheboxthemes,
Unfortunately, there isn’t a simple method of overriding wp_editor. You can achieve by selectively outputting a div if SiteOrignPage Builder is active, and then give it the siteorigin-panels-display-builder class which SiteOrigin Page Builder looks for when creating Page Builder Instances.
Here’s the Page Builder code that sets up Page Builders.
Here’s an example of how the Builder Form Field does this
Hi Alex
Thanks for the answer. Is there a particular / easy way that I should be enqueueing the Page Builder scripts?
Thanks
Hi Outtheboxthemes,
Yes. Here’s how we do this for the SiteOrigin Layout Block.
Great, thanks Alex!
Hi Outtheboxthemes,
No problem mate. Let me know if anything else comes up regarding this, and I’ll lend a hand. :)
Hi Alex
Sorry to be a pest but I’m still a little stumped.
Essentially what I’m trying to achieve is what this forum user seems to have been trying to achieve:
Thread: Is it possible to run the page builder on multiple editors
I’ve got a repeatable fieldset of WordPress WYSIWYG editors ( created with wp_editor() ) which I’d like to be able to attach the “Page Builder” tab to just as it appears and functions on the content editor of pages. You can see a screenshot of what I’m referring to here:
https://ibb.co/NrMh4Vn
Any additional help with this would be massively appreciated!
Thanks!
Hi Outtheboxthemes,
Unfortunately, there isn’t a simple/supported method of overriding wp_editor. The method we’re currently using to do this for the main page builder instance is only designed to override the main editor and not instances of wp_editor. The previously outlined methods will allow you to create page builder instances, but they’re not able to override wp_editor in the way you’re after. We don’t have a method to allow for that at this time. I know this isn’t ideal and I’m really sorry about that.