Custom Fields
Re-Envisioned
Support Meta Box Group Cloneable group with WYSIWYG

This topic contains 6 replies, has 3 voices, and was last updated by  Anh Tran 2 years, 7 months ago.

  • Creator
    Topic
  • #3813

    wefit.lucas
    Participant

    Hello, I’m having trouble with the WYSIWYG field.
    I have a cloneable group with 2 text inputs and a wysiwyg field. The WYSIWYG in the first group is not rendering properly (the tabs Visual and Text are there, but not the rest), but if I add a clone, the second one will work just fine. I’ve tried reloading the page, but still nothing.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #3817

    Anh Tran
    Keymaster

    Can you post your code to test?

    Thanks
    Anh

    #3824

    wefit.lucas
    Participant

    Apparently the problem starts on the second level group:

    $meta_boxes[] = array(
          'title'      => __( 'Content', 'textdomain' ),
          'id'         => 'myContent',
          'post_types' => 'rep_page',
          'fields'     => array(
            //----  Select Component Type Metabox  ----//
            array(
              'id' => 'content',
              'type' => 'group',
              'clone' => true,
              'sort_clone' => true,
              'fields' => array(
                array(
                  'id'   => 'myTitle',
                  'name' => __( 'Title', 'textdomain' ),
                  'type' => 'text',
                  'placeholder' => 'Title',
                ),
                array(
                  'id'   => 'myText',
                  'name' => __( 'Text', 'textdomain' ),
                  'type' => 'wysiwyg',
                  'options' => array(
                    'media_buttons' => false,
                    'textarea_rows' => 6,
                    'teeny' => true,
                  ),
                ),
                array(
                  'id'   => 'myGroup',
                  'type' => 'group',
                  'clone' => true,
                  'sort_clone' => true,
                  'fields' => array(
                    array(
                      'id'   => 'myText2',
                      'name' => __( 'Text', 'textdomain' ),
                      'type' => 'wysiwyg',
                      'options' => array(
                        'media_buttons' => false,
                        'textarea_rows' => 6,
                        'teeny' => true,
                      ),
                    ),
                  ),
                ),
              ),
            ),
          ),
        );
    #3826

    Anh Tran
    Keymaster

    Hi,

    I tested your code and saw the bug. It relates with the unique ID attribute for the editors which is a technical challenge at the moment. I will keep trying and release a fix as soon as I find a solution.

    Thanks

    #3893

    FED
    Participant

    I’m also in need of a solution to this issue. If possible, an ideal fix would work for any level of group-nesting.

    Thanks!

    #4045

    FED
    Participant

    Hi Anh,

    Any updates on this issue?

    Thanks

    #4049

    Anh Tran
    Keymaster

    Hi FED, the bug is complicated and I haven’t found a good solution yet. I will let you know as soon as I find a way.

    Thanks
    Anh

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.