Headless
(Headless)
Setembro 6, 2022, 8:35pm
1
O sumário não funciona quando os cabeçalhos estão dentro de uma div? Estou tentando criar um sumário com os cabeçalhos centralizados, mas parece impossível.
Eu acho que isso foi mencionado anteriormente, se eu entendi direito:
I have posts that have extra DIVs in their bodies. For example, On Storytelling - Public - Podcaster Community
The DIV which triggers the TOC generation is inside a DIV… and TOC notices that. But other headings, inside DIVs, don’t seem to get noticed by TOC.
[Screen Shot 2022-02-02 at 09.45.01]
…not the best screenshot. That’s an H2 in an arbitrary/just-for-styling DIV which does not appear in the TOC.
…not shown is the <div that triggers the TOC, which is inside the DIV with the crazy att…
We target the immediate child headings to exclude headings in quotes or oneboxes and other elements in the Table of Contents. Otherwise, we’d have to exclude them individually, which can be tedious.
Headless
(Headless)
Setembro 6, 2022, 9:52pm
3
Pelo que pude apurar, basicamente não há solução.
Canapin
(Coin-coin le Canapin)
Agosto 25, 2023, 2:35pm
4
Depende do que você tenta alcançar com seu outro conteúdo HTML.
Eu faço crosspost de uma possível solução alternativa: TOC doesn't work when wrapped with HTML tags - #2 by Canapin