Created
August 7, 2015 02:53
-
-
Save designbuildtest/b0b1d544c6349337633d to your computer and use it in GitHub Desktop.
WordPress TinyMCE customization filter
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
| function dbt_customize_tinymce_editor( $in ) { | |
| $in['block_formats'] = __( 'Heading 2' ) . '=h2;' . __( 'Heading 3' ) . '=h3;' . __( 'Paragraph' ) . '=p;'; | |
| $in['toolbar1'] = 'formatselect,bold,italic,underline,bullist,numlist,blockquote,link,unlink,pastetext'; | |
| $in['toolbar2'] = ''; | |
| $in['toolbar3'] = ''; | |
| $in['toolbar4'] = ''; | |
| $in['object_resizing'] = false; // Disable image re-sizing | |
| $in['paste_as_text'] = true; // Turn paste as plain text on by default | |
| return $in; | |
| } | |
| add_filter( 'tiny_mce_before_init', 'dbt_customize_tinymce_editor' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment