Home Forums Backend Issues (wp-admin) Creating a clone of the wysiwyg field


Creating a clone of the wysiwyg field

  • As part of a new project I’m working on, there is a need to have 2 types of wysiwyg field which have different toolbar buttons set up.

    I’ve tried to go about this by creating a new field type for the duplicate wysiwyg field, using the documentation here:

    Then inside the render_field() function, I tried switching the type from clone_wysiwyg to wysiwyg similar to how the type is reassigned in the post_object field type:

    // Inside class-acf-field-post_object.php:332
    function render_field( $field ) {	
        // Change Field into a select
        $field['type'] = 'select';
        // ...

    However, the wysiwyg field doesn’t initialise in the page edit view when I use it as part of a field group.

    How can I initialise the field and pass it custom TinyMCE args?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.