Skip to content

List Item: Add anchor support#64295

Closed
chiilog wants to merge 1 commit intoWordPress:trunkfrom
chiilog:add/list-item-anchor-support
Closed

List Item: Add anchor support#64295
chiilog wants to merge 1 commit intoWordPress:trunkfrom
chiilog:add/list-item-anchor-support

Conversation

@chiilog
Copy link
Copy Markdown

@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

@github-actions
Copy link
Copy Markdown

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: @purgexpurge@gmail.com.

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: purgexpurge@gmail.com.


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
Copy Markdown
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