close
Skip to content

Option to set title for the Table of Contents block  #52378

@huubl

Description

@huubl

What problem does this address?

There is no good way of setting a title for the Table of Contents block

What is your proposed solution?

Option to set a title for the Table of Contents block, something like this:

image

And this as HTML:

<nav class="wp-block-table-of-contents">
    <!-- POSSIBILITY TO ADD THIS: -->
    <h2 class="wp-block-table-of-contents__title">Contents on this page:</h2>
    <ol>
        <li>
            <a class="wp-block-table-of-contents__entry" href="https://test.local/#heading-page-1">heading page 1</a>
        </li>
        <li>
            <a class="wp-block-table-of-contents__entry" href="https://test.local/#heading-page-2">heading page 2</a>
        </li>
        <li>
            <a class="wp-block-table-of-contents__entry" href="https://test.local/#heading-page-3">heading page 3</a>
        </li>
    </ol>
</nav>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions