Home › Forums › ACF PRO › insert values into fields programmatically › Reply To: insert values into fields programmatically
I ran into a problem with tinyMCE.activeEditor. Have you tried this with multiple wysiwyg fields on the page? The problem I had is that I was always getting the selected content in the first active editor. For example if you set the first on to text it would always get the content from the second on. If the first on was active then it would always pull the content from there. That’s why in my code above I loop through all the editors and make sure I have the right one by checking the ID.
If all you have is the one editor then you probably won’t run into the problem.
I’m actually trying to figure out how to get a change in the editor to trigger an action now and I’m not having much luck either. More than likely I’m going to need to figure out how to add the action to the editor since the textarea field never seems to get updated until you submit the post.
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.