Hello,

I'm searching for input filter that would correct html H1 etc. headings.

I would like to force content to contain only H2 tags and lower. H1 should be reserver for node title.

I don't want to simply remove H1 tags. Rather subtract one heading level from every H tag if there is H1 tag present.

Is there currently some solution for this?

Comments

WorldFallz’s picture

In all honesty, the best way to do this is to simply remove the H1 tag from the allowed tags in the filtered html input format. Alternatively, if you really want to do it they way you describe, you could probably do it with the http://drupal.org/project/flexifilter module.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

no2e’s picture

(subscribing)

It's also often a problem for users to realize, which heading level is used before their edit area, so with wich heading level they should start.

An outline of all current headings would be useful (maybe as a block in the sidebar). So the user can see, which headings where used and at which level his content should be placed.

palmstrom’s picture

Simple and partial solution for WYSIWYG content editors is to remove H1 from list of possible paragraph styles. However user is still allowed to insert H1 paragraph in text using paste function.

no2e’s picture

I don't offer WYSIWYG editors at all.

It's not just about "crashing" the headline structure, but giving the user advice which headline to use.
In some situations it might be desired to use a second h1 or in other cases it might be undesirable to use h2 or even h3 (not every node is a simple "article", so there are many possibilites of structuring the content with headlines).

In this forum, for example:
when I use headlines, I first have to open another forum topic to realize, what headline level is used for the thread topic, so that I can start with one lower level.