菜单

TYPO3 RTE Tip: Putting code tags inside ul, li, or ol tags

2010年09月6日 - typoscript

Sometimes I write tutorials about computer stuff. And sometimes I write lists in those tutorials.

The problem I was having with TYPO3 when doing this was that whenever I put a <code> tag inside of an ordered or unordered list, the <code> tag wasn’t properly translated on the frontend of the web site. The < and > brackets around the ‘code’ tag were run through htmlspecialcharacters and were showing up on the front end.

Luckily and after searching, I found a solution that allows me to put code tags in lists.

All I did was add the following to the typoscript template of my web site.

  1. #########
  2. ### This will allow code tag inside ul & ol
  3. lib.parseFunc_RTE {
  4. # Processing  <ol> and  <ul> blocks separately
  5. //here you’ll need to list all tags, you assume to be external blocks
  6. externalBlocks = ol, ul
  7. externalBlocks {
  8. ol.callRecursive=1
  9. ol.stripNL=1
  10. ol.stdWrap.parseFunc = < lib.parseFunc
  11. ul.stripNL=1
  12. ul.stdWrap.parseFunc = < lib.parseFunc
  13. ul.stdWrap.parseFunc = < lib.parseFunc
  14. }
  15. }

发表评论

电子邮件地址不会被公开。 必填项已用*标注