I’m trying to get a Table of Contents from all h2 in text fields in Builder Blocks. I was just using one text field before. Now I’ve got several Blocks that contain a text field with possible h2’s in there.
This will give me the text I need, but I’m in the dark on how to proceed, could you turn on the light for me? Thanks.
@timoetting It works, kind of, I also get non h2 text pulled in. For example 3. is a h2 but 4. is text from the same text field. Also getting some field names sections: and columnsstructure:
In case I’m making mistakes in my blueprint (works without errors), this is the blueprints/blocks/carrousel where paragraph text gets pulled in and a field name slides:
label: Carrousel {{ carrouselname }}
name: Carrousel
tabs:
content:
label: Content
icon: edit
fields:
text:
label: Text
type: markdown
slides:
label: Slides
type: structure
min: 2
max: 6
columns:
images:
width: 1/4
caption:
width: 3/4
fields:
images:
label: Images
type: files
max: 1
uploads: false
layout: cards
size: tiny
info: "{{ file.dimensions }}"
image:
cover: true
back: black
caption:
label: Caption
type: markdown
buttons:
- bold
- italic
- code
- ul
- ol
- pagelink
- link
- email
settings:
label: Settings
icon: cog
fields:
carrouselname:
label: Name
type: text
help: For panel only
carrouselinfo:
label: Info
type: info
text: A carrousel can hold up to a maximum of 6 images