Adding rich text editor to my plugin

wp_editor() outputs the textarea(html codes), so, maybe you dont need to use that in functions.php, but use inside the page’s source. (for example, in your plugin.php: <div class=”blabla> <form action=”” method=”POST”> <?php wp_editor( ‘Hi,its content’ , ‘desired_id_of_textarea’, $settings = array(‘textarea_name’=>’your_desired_name_for_$POST’) ); ?> <input type=”submit”> </form> </div> note: it may wont work for add_option function..

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

help on wp_editor via ajax load [duplicate]

I’m not good with English, but the answer is that the editor class calls the scripts needed in the admin footer (wp-includes/class-wp-editor.php line 160) : add_action( ‘admin_print_footer_scripts’, array( __CLASS__, ‘editor_js’), 50 ); add_action( ‘admin_footer’, array( __CLASS__, ‘enqueue_scripts’), 1 ); So when you call the wp_editor function in your ajax, the scripts aren’t printed with it, … Read more

Using multiple instances of wp_editor in Custom Post Type admin area

you’ve got a lot of options. some of which are: to toot my own horn, i have used WP Alchemy to create repeating sortable tinyMCE editors with all the code available here http://www.kathyisawesome.com/426/multiple-wordpress-wysiwyg-visual-editors/ there is also the http://www.advancedcustomfields.com/ plugin. you can definitely have multiple instances, but you can’t add dynamic blocks on the fly.

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

Add visual editor to Media Edit Screen

This function added to functions.php does exactly that: // Enables Editor in Media edit screen. function add_editor_support_for_attachments($settings) { if( get_post_type() == ‘attachment’){ $quicktags_settings = array( ‘buttons’ => ‘strong,em,link,block,del,ins,ul,ol,li,code,close’ ); $settings = array( ‘wpautop’ => true, ‘textarea_name’ => ‘content’, ‘textarea_rows’ => 10, ‘media_buttons’ => false, ‘tinymce’ => true, ‘quicktags’ => $quicktags_settings, ); return $settings; } } … Read more