Home › Forums › General Issues › How to turn custom fields into something I can insert into WYSIWYG editor? › Reply To: How to turn custom fields into something I can insert into WYSIWYG editor?
It’s something that you can do, but will take a lot of work as most of what you want to do is not documented and there are very few examples that exist.
You’ll need to add custom JavaScript to ACF https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/
In the JavaScript you’ll need to detect changes in the repeater sub fields and then you’ll need to update the value in the tinyMCE editor where you want to put the gallery field.
Alternately you could create a custom shortcode that could be inserted into the gallery where the shortcode gets the values of the repeater and inserts a gallery into the desired location when displaying the field. https://codex.wordpress.org/Shortcode_API
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.