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
Closed

Wysiwyg not displaying correctly within repeatable group. #462

robinwkurtz opened this issue Sep 16, 2015 · 5 comments

Comments

@robinwkurtz
Copy link

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
Copy link

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
Copy link
Contributor

gyrus 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
Copy link

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

@gyrus
Copy link
Contributor

gyrus 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
Copy link
Member

Closing as duplicate: #264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants