thoughtis / cata-blocks

Block Editor components for use with the Cata theme.
GNU General Public License v3.0
1 stars 0 forks source link

Update Table of Contents edit component to match rendered content #134

Closed douglas-johnson closed 6 months ago

douglas-johnson commented 6 months ago

Continuing from #132 and #133 I'm still trying to apply a block style in a theme. This time the issue is that the editor content doesn't match the rendered content.

The edit component for the table of contents block doesn't account for the <details> or <div> that is wrapped around the inner content. So when I tried to apply styles to the first child, this happened in the editor. The styles are applied to the summary and the nav comes after, which isn't quite right.

Screenshot 2024-03-07 at 1 39 09 PM

I think this fix would just change the editor appearance and the rendered content would stay the same.