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

Feature Request: Upon adding TOC, there should be a Dynamic Heading option #3347

Open
andeng1106 opened this issue Oct 8, 2024 · 1 comment
Labels

Comments

@andeng1106
Copy link

Is your feature request related to a problem? Please describe.
Yes. People are unable to use TOC block for widgets, sidebar, post templates, etc.

Describe the solution you'd like

  • There should be a new option in TOC block named Dynamic Headings that should be enabled to get dynamic headings (e.g. TOC in sidebar gets the headings from site editor)
  • Option Name: Dynamic Headings
    • Tooltip / Note: Use headings in current post
  • If this is enabled:
    • should not be able to exclude heading
    • should not be able to click to type
    • should not show "Start adding Heading blocks to create..." upon adding a new TOC, if there's no headings yet in the current editor
      • instead, it should show sample entries
    • use PHP to parse the current page content and gather all blocks detected

Describe alternatives you've considered
Rewrite/re-word TOC block items manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@andeng1106 and others