I’m building a slider with ACF, and would like to modify WYSIWYG fields depending on data from some other fields.
For example: I want to set the background color of the WYSIWYG-body to that which I pick with a ACF color picker. Or, set the background of the WYSIWYG-body to the image I choose with the image picker.
Does anyone know how I can do this?
I think I need to:
– Know when all fields have properly been initiated
– Know when an image or color have been selected
– Get access to the tinyMCE WYSIWYG DOM that is inside iFrames.
Clues, hints, instructions? 🙂
Hi @johan-dahlbredband2-se,
Thanks for the post.
There is actually an ACF add on that offers the ability to customize the WYSIWYG editor styles out of the box.
Please have a look here: https://wordpress.org/plugins/advanced-custom-fields-custom-wysiwyg-styles/