Here we will learn about How to add custom tag in wp_editor.
For this, WordPress provides this function QTags.addButton.
QTags.addButton function allows you to include additional buttons in the Text (HTML) mode of the wp_editor.
Here is a syntax of QTags.addButton function:
QTags.addButton( button_id, display_name, start_tag, end_tag, shortcut_key, title, priority, instance );
Parameters:
Here is a small Example:
In this example, I have added an underline tag in wp_editer.
Before:
After add this code:
// add Underline tag to the html editor function underline_tag_add_quicktags() { if ( wp_script_is('quicktags') ){ ?> <script type="text/javascript"> QTags.addButton( 'underline_tag', 'U', '<u>', '</u>', 'underline', 'underline', 20, '' ); </script> <?php } } add_action( 'admin_print_footer_scripts', 'underline_tag_add_quicktags' );
Output:
In this article, we have to show Create and Used PIPE in angular
In this article, we have to show Create and Used PIPE in angular
In this article, we have to show Create and Used PIPE in angular