Created
March 7, 2012 14:18
-
-
Save agustibr/1993393 to your computer and use it in GitHub Desktop.
WP Collection of Code for functions.php [3]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Safe Pasting for TinyMCE (automatically clean up MS Word HTML) | |
*/ | |
function tinymce_paste_options($init) { | |
$init['paste_auto_cleanup_on_paste'] = true; | |
$init['paste_convert_headers_to_strong'] = true; | |
return $init; | |
} | |
if( is_admin() ) add_filter('tiny_mce_before_init', 'tinymce_paste_options'); | |
// @link : http://www.kevinleary.net/clean-up-microsoft-word-pasted-html-tinymce/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment