Skip to content

How to add buttons to bbPress visual editor

  • This topic has 0 replies, 1 voice, and was last updated 1 year ago by Admin.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #156183
    Admin
    Administrator

    How to add buttons to bbPress visual editor. Add this code to your theme function file.

    // add more buttons to the html editor
    function generic_quicktags() {
        if (wp_script_is('quicktags')){
    ?>
        <script type="text/javascript">
        QTags.addButton( 'eg_enlighter', '{ }', '<pre class="EnlighterJSRAW" data-enlighter-language="generic">', '</pre>', 'q', 'Code Enlighter', 111 );
        </script>
    <?php
        }
    }
    add_action( 'wp_print_footer_scripts', 'generic_quicktags' );
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.