Is there a JS helper function for adding block comments? #68749
ivanjeremic
started this conversation in
General
Replies: 1 comment
-
I don’t know of anything. You might check out the raw handling part of the blocks API. I'm not at all familiar with it. But for example, in a browser with the WP editor loaded you can run this in dev console wp.blocks.serialize( wp.blocks.rawHandler({ HTML: '<p>Hi!</p>' }) ) and get: <!-- wp:paragraph -->
<p>Hi!</p>
<!-- /wp:paragraph --> I bet it has its limitations but, again, I'm not familiar with it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does WordPress have a special javascript helper function on NPM maybe that automatically adds these comments to some handwritten HTML?
Beta Was this translation helpful? Give feedback.
All reactions