Skip to content

getPageTableOfContents() not getting headers inside Callouts #667

@IttoSanzzo

Description

@IttoSanzzo

Well, it's a somewhat strange behavior that I've been seeing consistently. I've tried to test possible fixes as much as possible, but to my knowledge, it doesn't really seem to be a problem on my end.

To explain briefly, when using the getPageTableOfContents() function, it normally returns an array with all the page's headers and their information. But for some reason, when using it on pages that have callouts, and headers within those, the function returns only the external headers, ignoring the headers present within other components.

I checked on Notion, and there, headers within callouts are normally considered for the table of contents (although those within quotes are not, which is still strange, but oh well).

Could this inconsistency with the normal operation of Notion's table of contents be intentional? I apologize in advance if it's actually something I'm doing wrong, too, because I can't really deny the possibility. Anyway, thank you for your time and attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions