Home › Forums › Front-end Issues › Frontend WYSIWYG Problems › Reply To: Frontend WYSIWYG Problems
Thank you, Elliot for your previous help. I have come up with some more information. I understand that I am using some third party code, however I have tested this functionality with basic jQuery .post()
methods. Each variant has the same result.
Here is the status of the situation:
acf_form_head()
is at the top of my file.ajaxurl
has been defined.acf_form()
is populated but the ACF WYSIWYGs are not correctly initialized.acf/setup_fields
trigger performs successfully as the media uploaders and location fields initialize their scripts successfully.I edited your wysiwyg.js
file to deliver some debugging information:
// validate tinymce
if( ! _wysiwyg.has_tinymce() )
{
console.log( "FAILED TO VALIDATE TINYMCE" );
return;
}
This indeed returns a failure on the initial page load (as there are no ACF forms or WYSIWYGs). However, even after the AJAX callback has successfully completed, a failure is returned for the number of WYSIWYGs in the form. I am dumb when it comes to anything about tinyMCE. I tried an attempt to solve this within the AJAX success callback (before the `acf/setup_fields’ trigger):
$('.acf_wysiwyg textarea').each(function() {
tinymce.execCommand('mceAddControl', false, $(this).attr('id'));
});
Suggestions or thoughts? I absolutely love ACF and use it for many of my client’s projects (love the repeater fields). I would love to help you solve this issue for future users, so in the meantime, I will be diving into your source and seeing if I can come up with a solution. Feel free to offer your suggestions and move on. I will simply keep posting my findings here for other users (and hopefully we can get some community support on this issue).
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.