Uncaught TypeError: switchEditors.switchto is not a function
Uncaught TypeError: switchEditors.switchto is not a function
Uncaught TypeError: switchEditors.switchto is not a function
Remove the preview link box since 6.0 update
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
I just had the exact same issue. You have to include the editor in the supports argument array to get custom mce boxes to show. I solved the issue by hiding it with CSS: function move_posteditor( $hook ) { if ( $hook == ‘post.php’ OR $hook == ‘post-new.php’ ) { add_action( ‘admin_print_footer_scripts’, ‘remove_edit_div’ ); } … Read more
You’re looking for add_editor_style(). Just drop that in your functions.php file and then put an editor-style.css file in your theme with whatever styles you want.
http://wordpress.org/support/topic/upgraded-to-32-visual-editor-buttons-missing/page/2 this fixed it. The Tiny MCE is looking for a file: wp-includes/js/tinymce/langs/en.js I just checked the file and on my installation the file path is this: wp-includes/js/tinymce/langs/wp-langs-en.js I deleted the ‘wp-langs-‘ part of the file name ‘wp-langs-en.js’ and I seem to be working again.
The problem is that the wp_editor() automatic load the scripts and this is not possible dynamic. You must enhance your plugin, code and add the scripts also dynamic or via ajax. WP include the scripts and styles via wp_enqueue_script() and this is not usable in a dynamic change of DOM, it was registered for better … Read more
strip_tags() is not bad, but there may be a lot of tags you’ll have to allow. So maybe you can use str_replace() to only get rid of the <p>-tag: <?php $field = get_field(‘wysiwyg’); // your wysiwyg field data $strip = array(‘<p>’,'</p>’); // search for <p> echo str_replace($strip,”,$field); ?>
Use the Paste as Text button, or paste into the Text tab instead of the Visual tab.
It’s possible to manually add buttons to your editor. https://codex.wordpress.org/TinyMCE_Custom_Buttons The Codex actually links to a full tutorial detailing the process, as well. http://code.tutsplus.com/tutorials/guide-to-creating-your-own-wordpress-editor-buttons–wp-30182 That will guide you through all the steps: Adding shortcodes to your site Creating a TinyMCE plugin (register, set up, create buttons, and add what they should do) Including editor styles … Read more