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 Editor #5

Open
tveelbehr opened this issue Feb 16, 2015 · 3 comments
Open

Wysiwyg Editor #5

tveelbehr opened this issue Feb 16, 2015 · 3 comments

Comments

@tveelbehr
Copy link

Hi Tyler,

thanks for the great work on this ACF Field. It works perfectly, except the wysiwyg editor. Im using ACF 5.0 pro with the flexible content plugin.

If I place a wysiwyg editor field in a field group and then use this field group with your acf reusable field group plugin in a flexible content, the wyswig editor is not displayed. Only the tabs (visual/text) appear, but the editor toolbars are missing.

After saving the page, the editor renders as expected. if I add a new flexible content layout to the page,
the wysiwyg editor of that new layout is broken again, until saving the page.

Is there a way to reload the tinyMce after loading the fields. Or any other work around? maybe you can point me in the right direction.

Best regards,
Tobi

@tybruffy
Copy link
Owner

Yea this sounds like an issue related to the javascript, there's some weirdness between the reusable fields and the Flexible Content/Repeater style fields that I've never had the time to quite look out for.

I'm pretty swamped this week, but I'd be happy to accept a PR if you can fix the issue yourself, otherwise I will try to look into it as soon as I have some time.

@tveelbehr
Copy link
Author

The problem does not only affect the wysiwyg fields. If you have multiple fields of the same type in repeater/flex content, the will overwrite each other on save.
This seems to happen because the reusable field ids are the same, that also causes the tinymce to not load correctly. I checked the flexible content rendering of the sub fields, and they all have unique ids generated when added to the content. This part is missing in the reusable fields addon. I'm working on a fix. I will let you know when I'm done :)

@socialblogsite
Copy link

Have you found a solution for this?
I don't know if I'm stuck at this or even after that ( a reusable group field used as a flexible content field returns null when I dump the content of the repeater's sub-fields)

I haven't found documentation anywhere to retrieve the field's data. I just realized they could be designed to be retrieved as regular fields, not sub-fields.

Can anyone lead me to some documentation/support link?

Is it possible it returns null because the post type for the source fields group doesn't match the current post type? (Using the same one makes the group to appear twice in the post editor)

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

3 participants