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

Allow enabling/disabling autogenerated anchors in heading blocks #38216

Closed
priethor opened this issue Jan 25, 2022 · 4 comments
Closed

Allow enabling/disabling autogenerated anchors in heading blocks #38216

priethor opened this issue Jan 25, 2022 · 4 comments
Labels
[Block] Heading Affects the Headings Block [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.

Comments

@priethor
Copy link
Contributor

What problem does this address?

Gutenberg 11.8 introduced a mechanism to autogenerate HTML anchors in Heading blocks. While a useful enhancement, there are cases where it might desirable to disable the automatic generation of headings.

The desire to control this setting has been expressed a few times:

What is your proposed solution?

Adding a flag to enable/disable the automatic anchor generation would provide developers the flexibility to decide whether to use them or not. Some implementation options include:

  • Adding a flag to disable the automatic generation.
  • Disabling again the automatic generation by default, and adding a flag to enable the anchor generation.
  • In case the automatic generation is disabled by default, enable it if a ToC block exists in the current page/post.
@priethor priethor added [Type] Enhancement A suggestion for improvement. [Block] Heading Affects the Headings Block labels Jan 25, 2022
@Mamaduka
Copy link
Member

@priethor, let's add the "Needs Design" label as well.

I think this option can be placed in the "Preferences" panel, but I'm not exactly sure where.

@skorasaurus
Copy link
Member

I'm a little confused why we should make another issue when there is already #38171 open with this; please reopen and explain if this very different than the existing issue.

@skorasaurus skorasaurus added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Jan 25, 2022
@priethor
Copy link
Contributor Author

priethor commented Jan 25, 2022

I opened this as a feature enhancement proposing different solutions and consolidating previous discussions around the subject, as #38171 was reported as a bug. I'm happy to continue work on that issue but I would recommend clarifying the issue title and description in that case.

@annezazu
Copy link
Contributor

@priethor renamed the other issue to make it clearer - can you comment on that issue to consolidate all of this great information? Love your solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants