Home › Forums › Bug Reports › Bug when using any WYSIWYG but tinyMCE in WP with ACF
I’m not sure if this should be properly labeled a bug, feature, or change request, but my testing so far indicates that ACF WYSIWYG fields completely break (as in the WYSIWYG editor never loads in the ACF admin backend) if the default editor in WP is changed from tinyMCE to anything else. In looking at the ACF code, this seems to stem from a lkess than ideal apporach of looking for and targeting tinyMCE field directly.
Within the ACF code (acf-input.min.js)
the problem arises with the call to and use of the function:
initalize_tinymce()
Yet WP provides a way to call/initialize the “default” editor (since version 3.3), whatever the site admins may decide that should be:
wp_editor() – https://codex.wordpress.org/Function_Reference/wp_editor
I think if you updated your initialization code to use the WP core feature, instead of the hard-coded reliance on tinyMCE, this would fix multiple problems folks have run in to:
https://support.advancedcustomfields.com/forums/topic/wysiwyg-editor-not-appearing-in-edit-page/
https://support.advancedcustomfields.com/forums/users/btaylor/replies/
https://support.advancedcustomfields.com/forums/topic/toolbar-tinymce-not-showing-on-4-1-8-1/
I did notice one note in the changelog for ACF Pro 5.5.13 (https://www.advancedcustomfields.com/blog/acf-pro-5-5-13-update/)
“WYSIWYG field: Fixed JS error when using CKEditor plugin”
But I just tested with ACF Pro 5.6.8, and am still getting error whenever I try to set my WP default WYSIWYG to CKEditor, and then load any page that includes an ACF WYSIWYG field:
acf-input.min.js?ver=5.6.8:3
Uncaught TypeError: Cannot read property ‘acf_content’ of undefined
at Object.defaults (acf-input.min.js?ver=5.6.8:3)
at Object.initialize_tinymce (acf-input.min.js?ver=5.6.8:3)
at Object.initialize (acf-input.min.js?ver=5.6.8:3)
at Object.initialize (acf-input.min.js?ver=5.6.8:3)
at acf-input.min.js?ver=5.6.8:1
at d (acf-input.min.js?ver=5.6.8:1)
at Object.i (acf-input.min.js?ver=5.6.8:1)
at Object.do_action (acf-input.min.js?ver=5.6.8:1)
at Object._load_field (acf-input.min.js?ver=5.6.8:1)
at d (acf-input.min.js?ver=5.6.8:1)
This is an important bug to get fixed. We have been working on enhancements to CKEditor to help people author content more accessible to people with disabilities. Many WordPress installations use your plug-ins, so I encourage you to fix this as soon as possible.
More information on a11yFirst project:
https://a11yfirst.library.illinois.edu/
This should be submitted using this page https://support.advancedcustomfields.com/new-ticket/ rather than posting on this forum.
The topic ‘Bug when using any WYSIWYG but tinyMCE in WP with ACF’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.