Quicktags – p, hr, pre
Quicktags for the text editor.
// Add Quicktags function custom_quicktags() { if ( wp_script_is( 'quicktags' ) ) { ?> <script type="text/javascript"> QTags.addButton( 'eg_paragraph', 'p', '<p>', '</p>', 'p', 'Paragraph tag', 1 ); QTags.addButton( 'eg_hr', 'hr', '<hr />', '', 'h', 'Horizontal rule line', 201 ); QTags.addButton( 'eg_pre', 'pre', '<pre>', '</pre>', 'q', 'Preformatted text', 111 ); </script> <?php } } // Hook into the 'admin_print_footer_scripts' action add_action( 'admin_print_footer_scripts', 'custom_quicktags' );