This is a paragraph and a hr-separator in html:
<p>Test</p>
<hr/>
This is what happens when I create it in the visual editor:
<!-- wp:paragraph -->
<p>Test</p>
<!-- /wp:paragraph -->
<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->
Yeah, my paragraph started and endend, thanks for clarifying my p-tags. What use have those comments? Can I somehow disable the creation of them? Lets give the paragraph some styling:
<p class="has-text-align-center has-secondary-color">Test</p>
This is what the visual editor does:
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":
{"text":"var:preset|color|secondary"}}}},"textColor":"secondary"} -->
<p class="has-text-align-center has-secondary-color has-text-color
has-link-color">Test</p>
<!-- /wp:paragraph -->
If I remove this crap, it looks completely the same. So what is the point? Can someone from a technical perspective explain why wordpress is bloating my html with json-data-commentaries instead of just having a clean html/css style binding? Why is the editor storing data in commentaries instead of parsing them from the html it just wrote in the first place, where all this data is already stored in classes?
This sounds like a rant and partly it is, but I really try to understand the technical reasoning behind it.