Support Forum
Support › Meta Box Group › Cloneable group with WYSIWYG
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.
Can you post your code to test?
Thanks
Anh
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,
),
),
),
),
),
),
),
);
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
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!
Hi Anh,
Any updates on this issue?
Thanks
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