Bug #18516
closedheadListTags in class.t3lib_parsehtml_proc.php are hardcoded
0%
Description
the headListTags are hardcoded:
// Static:
var $headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL,DD'; // List of tags for these elements
There is no way to add/remove elements to this list.
With the attached patch it is possible to do that.
Condition: the list should be defined in basic setup of rte, like
RTE.default.proc.headListTags = PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL,DD
Then this syntax is useful to add a single element:
RTE.default.proc.headListTags := addToList(CODE)
(issue imported from #M7961)
Files
Updated by Martin Kutschker over 16 years ago
Easy enough, but what exactly are headListTags!?! The name of the variable may stay at it is but the TS config must get a meaningful name.
What is the purpose of the list? It looks like a list of some block-level elements to me with P,DIV and TABLE as notable exceptions.
Updated by Uschi Renziehausen over 16 years ago
Hi Masi,
those headlisttags are those blockelements which may not be wrapped by a p on the way DB=>RTE and vice versa.
Perhaps we could call it doNotWrapWithP?
Uschi
Updated by Steffen Kamper over 16 years ago
exactly, the naming is not good.
I tried to configure a custom tag and searched for an option to avoid encapsuling with p. There was no other way as to add my tag to this list.
So imho it's an easy option to achieve this.
Updated by Stanislas Rolland over 16 years ago
Please always lowercase for tags.
Updated by Steffen Kamper over 16 years ago
i renamed "headListTags" to "blockElementList" which is better to understand