Document Outline: add support for heading elements outside of core Heading blocks#29610
Document Outline: add support for heading elements outside of core Heading blocks#29610ZebulanStanphill wants to merge 1 commit intotrunkfrom
Conversation
|
Size Change: +128 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
b074e90 to
3a523bb
Compare
|
I can't get the last unit test to pass, despite the described behavior working fine in my manual testing. Any ideas? |
3a523bb to
106714a
Compare
|
Since we decided in #29560 that the Table of Contents block should only support other blocks when gathering headings, I think it's safe to assume similar reasoning applies here. In other words, it's not worth the added complexity to support headings outside of the Heading block (and perhaps other core blocks). |
|
@ZebulanStanphill is there a hook to override the content being analyzed in the outline structure? As an agency developer making client sites, we severely limit the allowed blocks and use a component-driven workflow where custom blocks all control the specific heading tags. I'm now getting asked by our clients' SEO teams why the "Outline" tab is broken in the List View. |
|
@nikolowry Hi, I know a lot of time has passed, but can you or have you opened a new issue for the problem you described above? |
Description
Previously, the Document Outline only accounted for core Heading blocks. This PR adds support for heading elements in any other block, as long as that block includes the heading tags in its save implementation.
How has this been tested?
I tested to make sure that heading elements inside a Custom HTML block were listed in the Document Outline, and I confirmed that all the warnings appeared when appropriate. I also tested to make sure that clicking the entries in the Document Outline would jump to the block containing that heading.
Screenshots
Checklist: