Disable TinyMCE autoformatting

You can add this code to your function.php file of your theme remove_filter( ‘the_content’, ‘wpautop’ ); remove_filter( ‘the_excerpt’, ‘wpautop’ ); or you can use this plugin for easier control

Disabling TinyMCE keyboard shortcuts altogether

Not really a wordpress question – but have you tried tinyMCE.init({ .. custom_shortcuts : false }); ?? (might have a problem with IE though , on which case, you can override them with a foo function.) function disableShortcuts(){ tinyMCE.get(‘elm1’).addShortcut(“ctrl+b”,”nix”,”foo”); tinyMCE.get(‘elm1’).addShortcut(“ctrl+i”,”nix”,”foo”); } after that you will need to add the “foo” command to tinMCE: tinyMCE.init({ //your … Read more

Append Font Family in TinyMCE

You should use the styleselect key in the array of the TinyMCE settings for custom formats. This select is really useful for custom styles, enhancements. you find all relevant information for this solution in this answer to question #128931 in the same context. Via fontselect But if you like to use the font select, then … Read more

How to get WP editors tinyMCE instances

If you wait for the SetupEditor event then you can access the editors: add_action( ‘admin_print_footer_scripts’, function () { ?> <script type=”text/javascript”> jQuery(function ($) { if (typeof tinymce !== ‘undefined’) { tinymce.on(‘SetupEditor’, function (editor) { if (editor.id === ‘contentLeft’) { // Could use new ‘input’ event instead. editor.on(‘change keyup paste’, function (event) { console.log(‘content=%s’, this.getContent()); }); … Read more

TinyMCE removes iframe attributes width and height

[*] This took me ages to figure out but here is how it works now just add below code to the functions: function tinyMCEoptions($initArray) { $options=”*[*]”; $initArray[‘valid_elements’] = $options; $initArray[‘extended_valid_elements’] = $options; return $initArray; } add_filter(‘tiny_mce_before_init’, ‘tinyMCEoptions’); [*]

How to make WordPress and TinyMCE accept tags wrapping block-level elements as allowed in HTML5?

[*] A few years down the track, but hopefully someone else will find this solution useful… Although my issues trying to get this sort of thing to work in WordPress were slightly different, hopefully this solution will work for you too. Firstly, the issue with tags not being allowed to contain multiple block level elements … Read more