[TYPO3-english] Control nesting of tags via lib.parseFunc

Michael Bakonyi kontakt at mb-neuemedien.de
Mon May 13 15:48:50 CEST 2013


Am 10.05.13 18:27, schrieb Michael Bakonyi:
> Hi everyone,
> 
> as nobody answered in the rte-group I'll try it here again:
> 
> I'd like to remove p-tags within li-tags or div-tags within td-tags. Is
> it possible to control nesting like that?

I've now found a solution by myself:

lib.parseFunc_RTE{
  # li gets added to externalBlocks so that it can be processed separately
  externalBlocks = article, aside, blockquote, div, dd, dl, footer,
header, nav, ol, section, table, ul, li
  externalBlocks {
    # callRecursive needs to be activated for ul to activate parsing of
its content (= its containing li-tags)
    ul.callRecursive = 1
    li{
      stdWrap{
        HTMLparser{
          # tags which shall be removed get declared explicitly
          removeTags = p
          # all other (not declared) tags shall be kept
          keepNonMatchedTags = 1
        }
      }
    }
  }
}

Cheers,
Michael


More information about the TYPO3-english mailing list