Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Wysiwyg not displaying correctly within repeatable group. #462
Sorry if this is a repeat issue, I will look further into myself now.
I'm having problems with Wysiwyg text areas displaying properly when adding a new group. Generally on reload of the page it will display fine, but in this particular care I only have wysiwyg fields in the group so the group does not save.
At fast glance it looks like div.wp-editor-container does not render correctly.
---> Creating field <---
$repeatable_row->add_group_field($row_group, array( 'name' => __('Column 2', be_domain()), 'id' => 'col2', 'type' => 'wysiwyg', //'options' => $wysiwygOptions, ));
I've toggled the options, however here is what's being defined as
$wysiwygOptions = array( 'wpautop' => true, // use wpautop? 'media_buttons' => true, // show insert/upload button(s) //'textarea_name' => $editor_id, // set the textarea name to something different, square brackets  can be used here 'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..." 'tabindex' => '', 'editor_css' => '', // intended for extra styles for both visual and HTML editors buttons, needs to include the `<style>` tags, can use "scoped". 'editor_class' => '', // add extra class(es) to the editor textarea 'teeny' => false, // output the minimal editor config used in Press This 'dfw' => false, // replace the default fullscreen with DFW (needs specific css) 'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array() 'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array() );
Problem occurs on Chrome and Firefox
Thanks in advanced for the help.
I've just tried a WYSIWYG in a repeatable group, and my experience (in Chrome) is that the editor displays OK when you add a group, but the editor space doesn't accept the cursor. If you save the post, then things are OK. I'm guessing there's a bit of TinyMCE initialisation which needs to be done dynamically by the group repeat function?