Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Adds a custom class to a specific WYSIWYG editor within Advanced Custom Fields.
function my_acf_admin_footer() {
( function( $) {
acf.add_filter( 'wysiwyg_tinymce_settings', function( mceInit, id ) {
if ( id === 'special-wysiwyg-field' ) {
mceInit.body_class += ' magical-field-class';
return mceInit;
})( jQuery );
add_action('acf/input/admin_footer', 'my_acf_admin_footer');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.