Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wysiwyg not displaying correctly within repeatable group. #462

Closed
robinwkurtz opened this issue Sep 16, 2015 · 5 comments

Comments

@robinwkurtz
Copy link

commented Sep 16, 2015

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

$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

screen shot 2015-09-16 at 6 51 45 pm

Thanks in advanced for the help.

@daveromsey

This comment has been minimized.

Copy link

commented Sep 21, 2015

This is a known issue:Metabox containing WYSIWYG editor cannot be moved or used in a repeatable way at this time (this is a TinyMCE issue).

See WP Trac ticket #19173 for more information.

@gyrus

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2015

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?

@daveromsey

This comment has been minimized.

Copy link

commented Oct 5, 2015

@gyrus Sounds like that is the case. This comment by azaozz might be helpful but I have not attempted it.

@gyrus

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2015

Thanks @daveromsey, will have a look if I get a chance. For now I'm just putting a notice in to warn users to save after adding a new instance of the group.

@jtsternberg

This comment has been minimized.

Copy link
Member

commented Oct 5, 2015

Closing as duplicate: #264

@jtsternberg jtsternberg closed this Oct 5, 2015

jtsternberg added a commit that referenced this issue Aug 1, 2016
Update readme, and reference all PRs/issues:
Fixes #26, fixes #99, fixes #260, fixes #264, fixes #356,
fixes #431, fixes #462, fixes #657, fixes #693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.