Home>Support>Is it possible to run the page builder on multiple editors

Is it possible to run the page builder on multiple editors

Hello,

Can I activate the page builder on multiple wp_editors (I am loading them through meta boxes)? I tried doing it via JS by customizing the variables before

builderView
.render()
.attach( {
container: container
} )
.setDataField( field )
.attachToEditor();

But so far it has proven a bit difficult.

Can you please advise?

Thank you
Best regards,
Chris

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 10 months ago Alex S
    Hi, I Work Here

    Hi Cristian,

    Yes, it’s possible for SiteOrigin Page Builder to affect multiple editors.
    Can you please provide me with a copy of your relevant code so I can take a look over it?

  2. 5 years, 10 months ago Cristian Carp

    Hello Alex,

    Thanks for replying – this is how I load another wp_editor:

    /* Define the custom box */
    add_action( ‘add_meta_boxes’, ‘testeditor_add_custom_box’ );

    /* Do something with the data entered */
    add_action( ‘save_post’, ‘testeditor_save_postdata’ );

    function testeditor_add_custom_box() {
    add_meta_box( ‘wp_editor_test_1_box’, ‘WP Editor Test #1 Box’, ‘wp_editor_meta_box’ );
    }

    function wp_editor_meta_box( $post ) {

    // Use nonce for verification
    //wp_nonce_field( plugin_basename( __FILE__ ), ‘myplugin_noncename’ );

    $field_value = get_post_meta( $post->ID, ‘_wp_editor_test_1’, false );

    wp_editor( $field_value[0], ‘editor2’ );

    }

    So then the editor appears as a TinyMCE editor as a meta box. I have tried customizing the JS code and manage to load an extra SiteOrigin Builder Panel but it doesn’t behave properly.. so maybe I am not doing it right

    Thank you!

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More