WordPressAng text editor makadugang sa custom nga shortcut label nga buton
Idugang ang mosunod nga code sa imong WordPress theme's functions file:
//添加HTML编辑器自定义快捷标签按钮
add_action('after_wp_tiny_mce', 'add_button_mce');
function add_button_mce($mce_settings) {
?>
<script type="text/javascript">
QTags.addButton( 'hr', 'hr', "\n<hr />\n", "" );
QTags.addButton( 'h1', 'h1', "\n<h1>", "</h1>\n" );
QTags.addButton( 'h2', 'h2', "\n<h2>", "</h2>\n" );
QTags.addButton( 'h3', 'h3', "\n<h3>", "</h3>\n" );
QTags.addButton( 'pre', 'pre', "\n<pre>\n", "\n</pre>\n" );
</script>
<?php
}?
Paglaum Chen Weiliang Blog ( https://www.chenweiliang.com/ ) mipaambit sa "WordPress Text Editor Add Custom Shortcut Tab Button" aron matabangan ka.
Welcome sa pagpaambit sa link niini nga artikulo:https://www.chenweiliang.com/cwl-469.html
Aron maablihan ang daghang tinago nga mga limbong🔑, welcome sa pag-apil sa among Telegram channel!
Share ug like kung ganahan ka! Ang imong mga share ug likes mao ang among padayon nga kadasig!