Table of Contents block: remove editor-only wrapper <div>.#40899
Table of Contents block: remove editor-only wrapper <div>.#40899amustaque97 merged 1 commit intotrunkfrom
<div>.#40899Conversation
|
Size Change: +13 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
I'm not sure how to do it? I tried it but no luck! Could you help me how to make |
|
@amustaque97 What I mean is that the links in the Table of Contents block shouldn't go anywhere when clicked. |
You mean convert to static list? OR Do I need to |
|
@amustaque97 No, I mean that that clicking the links in the Table of Contents block should only ever select the block, and not activate the links (in contrast to the front-end behavior). |
amustaque97
left a comment
There was a problem hiding this comment.
Tested the changes. It works as expected. Thank you for working on this @ZebulanStanphill 👏👏👏

What?
This PR removes the extra
<div>in the Table of Contents block editor markup between the<nav>and<ol>.Why?
This makes the markup consistent between the editor and front-end, which will be helpful for future PRs. Specifically, I was working on a PR to add color controls to this block, and I didn't want to write editor-only styles to deal with the extra
<div>.How?
By switching to
useDisabledinstead of the<Disabled>component, we can disable the<ol>of the Table of Contents directly, instead of having to wrap it.Testing Instructions
trunk.