Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTML Anchors (ID Attribute) to Attributes in Block Parser #28757

Open
crowinck opened this issue Feb 4, 2021 · 3 comments
Open

Add HTML Anchors (ID Attribute) to Attributes in Block Parser #28757

crowinck opened this issue Feb 4, 2021 · 3 comments
Labels
[Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.

Comments

@crowinck
Copy link

crowinck commented Feb 4, 2021

Currently WP_Block_Parser and parse_blocks lists block classes/block styles among a block's attributes (attr), but the id attribute (HTML Anchor) can only be retrieved by parsing the HTML in innerHTML or innerContent, even when it is set by the user in a separate field under the Advanced block settings.

Given that there are more enhancements under discussion for the HTML Anchor (see #26685 ), and it will be important to any TOC features, it seems like the anchor should be included in a blocks listed attributes during parsing for easier php & server-side retrieval.

@talldan
Copy link
Contributor

talldan commented Feb 5, 2021

@crowinck It'd be great if you use the provided issue templates when reporting issues.

@talldan talldan added [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f Needs Technical Feedback Needs testing from a developer perspective. labels Feb 5, 2021
@jmesserve
Copy link

Any update on this?

@Soean
Copy link
Member

Soean commented Sep 2, 2021

@jmesserve No, not yet. You can work on a solution of this issue, if you want.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants