Skip to content

Attaching Page Builder to a custom WYSIWYG #90

@richardtape

Description

@richardtape

Hey folks,

I have a custom post type which - intentionally - doesn't support the standard WordPress editor. Instead, using CMB2, I have a custom WYSIWYG field (let's start with just one for now). The WYSIWYG field is implemented in 'the WordPress way' (as you would expect, CMB2 is dev'd by some top, top folk).

I'm trying to work out if there is a simple way (or if not simple, any way at all) to attach the Page Builder to a custom WYSIWYG field, rather than the standard WordPress editor.

I can see the builderView().attach() and builderView().attachToEditor() methods in the JS, but don't quite see how to manually say, "hey, attach yourself to THIS editor, not the 'normal' one"

Any tips?

I think the big concern is that in the attachToEditor() method it looks specifically for $( '#wp-content-wrap .wp-editor-tabs' ) which, when a post type doesn't support the native WordPress editor, doesn't exist.

(Note: I opened a thread on your support forums, but then I couldn't post a follow-up comment as it white-screened and I couldn't close the ticket. I thought it was best to report this as an actual issue as I discovered more after the initial forum post)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions