I create a new button in TinyMCE editor. And i want that new button of TinyMCE editor will show this below structure as dummy content while I press that button.

<div class="table-of-contents-container">
    <section class="table-of-contents">
        <ul class="items">
            <li><a href="#">Settings</a></li>
            <li><a href="#">Controls</a>
                    <li><a href="#">Core Custom Controls</a></li>
            <li><a href="#">Sections</a></li>
            <li><a href="#">Panels</a></li>
            <li><a href="#">Custom Controls, Sections, and Panels</a>
                    <li><a href="#">Customizer UI Standards</a></li>
            <li><a href="#">Custom Setting Types</a>
    </section><!-- .table-of-contents -->

In .js file how i join this whole html tag's, class and id and output it. My wordPress version is 5.5.1. And I am not willing to use shortcode. Please help me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.