Home › Forums › ACF PRO › insert values into fields programmatically › Reply To: insert values into fields programmatically
I finally managed it after a long time of searching. And it’s pretty simple.
I can grab the contents of the WYSIWYG field like this:
tinyMCE.activeEditor.getContent( content );
And set them like this:
tinyMCE.activeEditor.setContent( content );
I haven’t managed to get the wysiwyg field to trigger and event but I can work around that.
Also I don’t know how this would work if there were more than 1 wysiwyg field in the form.
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.