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

List Item: Add anchor support #64295

Closed

Conversation

chiilog
Copy link
Contributor

@chiilog chiilog commented Aug 6, 2024

What?

Added anchor support for list items.

Why?

Sometimes it is necessary to specify an anchor for a list item.

Fixes #29838

How?

Add anchor:true to supports in block.json

Testing Instructions

  1. Open a post or page.
  2. Insert a list-item block.
  3. Open Settings panel.
  4. Enter an anchor in HTML ANCHOR in Advanced

Screenshots or screencast

FireShot Capture 094 - Edit Post “list test” ‹ Gutenberg Develop — WordPress - localhost

Copy link

github-actions bot commented Aug 6, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @[email protected].

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: [email protected].


To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@shail-mehta shail-mehta added [Type] Developer Documentation Documentation for developers [Block] List Affects the List Block [Type] Enhancement A suggestion for improvement. and removed [Type] Developer Documentation Documentation for developers labels Aug 6, 2024
@talldan
Copy link
Contributor

talldan commented Aug 7, 2024

Thanks for making the PR, I decided to go with merging #48758 instead as it was the first PR created to solve the problem (and it's identical to the code in this PR)

@talldan talldan closed this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UI for setting ID (anchors) on list items (<li>)
3 participants