Insert b tag when pressing b button instead of strong tag
-
Is it possibile to modify the TinyMCE editor in such a way that:
- clicking the b (Bold) button would generate a
<b>
tag, rather than a<strong>
tag - clicking the i (italic) button would generate a
<i>
tag, rather than a<em>
tag
I tried placing this code inside
functions.php
but it didn’t workadd_filter('tiny_mce_before_init', 'modify_formats'); function modify_formats($settings){ $formats = array( 'bold' => array('inline' => 'b'), 'italic' => array('inline' => 'i') ); $settings['formats'] = json_encode( $formats ); return $settings; }
- clicking the b (Bold) button would generate a
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Insert b tag when pressing b button instead of strong tag’ is closed to new replies.