I need to answer my own question here. I was using the attributes from TinyMCE v3, but it needed to use the v4 format. Here’s what works:
add_action( 'acf/input/admin_footer', function() {
?>
<script type="text/javascript">
( function( $ ) {
acf.add_filter( 'wysiwyg_tinymce_settings', function( mceInit, id, field ) {
mceInit['formats']['removeformat'] = [{ selector: 'h1,h2,h3,h4,h5,h6,ul,li,b,strong,em,i,span,blockquote,pre,code', remove: 'all', split : true, expand : false, block_expand: true, deep : true }];
return mceInit;
} );
} )( jQuery );
</script>
<?php
} );
Related Posts:
- Remove headings option from Wysiwyg editor from ACF in a certain custom post type
- ACF Wysiwyg Editor Image srcset for responsive images [closed]
- Advanced Custom Fields plugin : displaying a field while omitting the p tags
- Equation input with preview in classic editor
- Filtering multiple custom fields with WP REST API 2
- How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with WordPress 3.0 and up?
- How to import CSV into Custom Post Type custom fields?
- ACF – get fields from group
- Front end form to create a custom post with preview
- Using WordPress’ WYSIWYG for comments
- update_post_meta and update_field ony working when saving the post
- How to get “Additional CSS Class” for ACF Gutenberg block
- Modify links when inserted by WYSIWYG editor
- Advanced Custom Fields select field : How to echo the label, not the value? [closed]
- Replace Taxomony Description Field with Visual/WYSIWYG Editor
- ACF: get_field() returning false [closed]
- Is it possible to create nested lists in the WYSIWYG editor?
- How can I stop TinyMCE from converting my HTML entities to characters?
- Generate a excerpt from an ACF-wysiwyg-field
- Adding custom fields to the header.php
- Cite-Tag for blockquotes
- How to get_terms() only of terms matching an ACF meta value?
- How can I filter Microsoft Word gunk from pasted content?
- Pods cms and “advanced custom fields” plugin
- Snippet: Use classes instead of inline styles for text alignment
- Adding a body class with ACF
- Returning all radio button options when using Advanced Custom Fields
- Apply custom style to single word in WordPress
- WP REST API: Order posts by meta value (acf)?
- wordpress REST-API upload image to ACF
- data-accordion removed in Visual Editor
- Query between dates using Date Picker fields
- Order and group posts by acf by month and year
- Get the label from ACF checkbox [closed]
- How to remove_filter that filters iframes in posts? [duplicate]
- Advanced custom field – gallery – display one random image
- two tinyMCE editors in the same page
- How to update a custom post title from a front-end form using ACF fields?
- Showing an ACF field in admin posts dashboard
- Google Places API With ACF [closed]
- Check for the existence of custom field
- Vimeo thumbnails [closed]
- How to wrap the content of the main tinyMCE editor with extra tags
- pre_get_posts filter using numeric meta_query comparison (from dates)
- ACF + contact form 7
- Is there a way to export Advanced Custom Fields data?
- Qtranslate + Advanced Custom Fields: how to have a multilanguage wysiwyg editor? [closed]
- Ability to edit image via WYSIWYG
- How to add a custom field to quick edit
- ACF Repeater Field, need IF statement for if sub field has content
- Can not create fields in ACF with code
- TinyMCE strips line breaks on mceAddControl
- Gutenberg First Block on Page Conditional?
- Using meta_query and custom fields within pre_get_posts to return posts within a numerical range
- Comparing arrays with meta_query in pre_get_posts
- Set default date in datepicker of an advanced custom field
- Advanced Custom Fields plugin : displaying a YouTube video
- Advanced Custom Fields – Check if multiple get_fields exist?
- ACF – Custom fields have dissappeared [closed]
- Error in Validate Field with ACF plugin in WordPress
- How to order by just the Time Field in Advanced Custom Fields
- How do I add a listbox to the TinyMCE editor?
- Using Gutenberg parse_blocks Function With ACF Custom Blocks?
- Query pages for use of a flexible content layout
- WordPress Gutenberg, update post content programmatically
- ACF get field label in custom code
- Using main style.css with add_editor_style
- How can I control the HTML output of my post?
- WYSIWYG editor in WP 3.2 plugin
- WYSIWYG – Getting the “link” button from HTML mode in Visual mode
- ACF repeater field with meta_query
- Custom Post Type archive link in WYSIWYG editor
- How to add custom fields in rss feed
- Dynamically adding WYSIWYG to metaboxes
- Add WYSIWYG to Image Description field
- sort by date in Advanced Custom Field
- Get specific repeater row (via advanced custom fields) based on Meta Query with Wildcards [closed]
- How to customize a divs background dynamically using Advanced Custom Fields Plugin?
- disable (read only) a field if within a custom post type name
- How to update custom taxonomy meta using ACF update_field() function or any other wordpress function
- Replace post’s “the_content” with ACF value
- ACF if / else checkbox [closed]
- PHP echo stripping formatting in Advanced Custom Fields [closed]
- Thumbnails generated from PDF in the “Media” section – how to show them in theme template?
- Post Object field orderby (Advanced Custom Field)
- How to count ACF Flexible Content Rows?
- ACF Plugin – Random Gallery Image with wp_get_attachment_image()
- How to change the page title from functions.php
- Sorting custom admin column by value
- Add a select a class dropdown in tinymce
- Acf Pro repeater field returns null [closed]
- Query between dates using date picker filter breaks in WordPress 4.2.1
- How to upload multiple images on frontend to ACF gallery using update_field
- Add TinyMCE to CPT metaboxes in 3.1?
- When adding buttons to the tinyMCE editor, how do I make them wrap to the next line and/or display in the “Kitchen Sink” area?
- Add user custom fields and make editable on frontend
- Insert Commas into ACF number field
- How I can check if get_theme_mod is in header or a template part
- Get ACF value after update user using save_post
- Using pre_get_posts for meta value of LIKE comparison on ACF repeater sub field