Add TinyMCE editor to post/page title input field

Adding this snippet to the functions.php of your wordpress theme will add the TinyMCE editor to the title input field of your wordpress posts and pages.



function tinymce_title_js(){ ?>
<script type="text/javascript">
jQuery(document).ready( tinymce_title );
function tinymce_title() {
tinyMCE.execCommand("mceAddControl", false, "title");
<?php }
add_action( 'admin_head-post.php', 'tinymce_title_js');
add_action( 'admin_head-post-new.php', 'tinymce_title_js');
function tinymce_title_css(){ ?>
<style type='text/css'>
#titlewrap{border:solid 1px #e5e5e5 !important;}
#title_ifr{height:50px !important;}
<?php }
add_action( 'admin_head-post.php', 'tinymce_title_css');
add_action( 'admin_head-post-new.php', 'tinymce_title_css');

Leave a comment