[TYPO3-rte] Control nesting of tags

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


Am 08.05.13 18:57, schrieb Michael Bakonyi:
> Hi,
> 
> 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-project-rte mailing list