TinyMCE’s “Clear Formatting” button doesn’t remove lists and headings

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 … Read more

Add custom value for link_class_list for the classic editor

As Jacob mentioned in the comment, WordPress adds a custom plugin to TinyMCE which uses a native window with extra features, like loading content from WordPress. The documentation I referenced is for the TinyMCE official link plugin. You can still use it, all you have to do is replace the wplink plugin with the link … Read more

How can I remove using built in wordpress filters

I agree with hakre – something funky is going on elsewhere, those shouldnt be appearing. As a sidenote, you could use the jQuery unwrap() function to remove those divs. jQuery(‘div.mceTemp img’).unwrap(); http://api.jquery.com/unwrap/

How to add future Posts to the new “Internal Linking” Feature

That’s a good catch. Here’s a possible work around. Create the future post placeholder and set the date ahead in the publish date picker. Then copy either the permalink or use a URL shortner plugin like le petit URL to generate a short URL. Copy/paste either URL into the internal linker. Screenshot: https://skitch.com/noelsaw/r1ni7/edit-post-wpverse-wordpress

How to add shortcode to show/hide press releases?

I coded this up quickly, based on Scribu’s writeup on script loading, might work for you or provide a starting point. The plugin file: <?php /* Plugin Name: MO_expander_shortcode */ class MO_expander_shortcode { static $add_script; function init() { add_shortcode(‘moexpander’, array(__CLASS__, ‘handle_shortcode’)); add_action(‘wp_footer’, array(__CLASS__, ‘add_script’)); } function handle_shortcode($atts, $content = null) { self::$add_script = true; // … Read more

wp_tiny_mce function not found

If you’re using WP 3.3+ I would recommend giving the new “wp_editor()” function a shot. I’ve used it in several plugins and even on the front end of sites and it’s pretty handy. More detail on how to use it can be found here http://soderlind.no/archives/2011/09/25/front-end-editor-in-wordpress-3-3/