It would be useful to be able to limit the heading options in the writer field, primarily to stop users adding <h1>
tags as these are usually handled somewhere else on the page. Something like the following perhaps:
text:
type: writer
label: Text
marks:
- bold
- italic
nodes:
heading:
- h2
- h3
- bulletList
- orderedList
This is quite an important missing feature for my use cases. I hardly ever want content editors to be able to enter h1 tags, and often only want to allow a subset of h2 through h6.
Not being able to do this feel more like a bug than a missing feature.
Fully agree with Isaac on this one
Yes, please. We also have to exclude the H1 in part because there should only be one per side. That would be really important for us. Currently we work around it with CSS. But this does not prevent H1 from being copied in.
As a workaround we currently use the kirbytags:after hook in a plugin: The function just string-replaces h1 to h2-tags and h4,h5,h6 to h3-tags. Surely not ideal but no problems so far.
Of course a limited selection in the panel would be the better solution.
For the time being there’s https://github.com/coralic/kirby-extended-writer which adds this functionality.
Just wanna add I’d find this to be a valuable addition to the writer field. It’s possible elsewhere such as the headings on the blocks so I think we all agree that whever we list a selection of headers for the user to select, there should be a way to limit those selections. That’s the flexible Kirby way of things.