[TYPO3-english] lib.parseFunc - P without newline (char10) or encaps every line
Martin Kokes
shr3k at typo3-hosting.com
Sat Mar 3 15:08:17 CET 2012
Hello list & group,
I need to prepare some HTML code for ExtJS panel with fluid (<f:format.html
parseFuncTSPath="myspecialjs.parseFunc_RTE">) so I need to generate JS code
in this way:
---
var myContent = '<div id="myid">'+
/* here comes my HTML from RTE */
'<p class="bodytext">Some content</p>'+
'</div>';
---
Everything works until I have RTE content with one paragraph. With two
paragraphs I become
var myContent = '<div id="myid">'+
/* here comes my HTML from RTE */
'<p class="bodytext">Some content</p>
<p class="bodytext">Some content2</p>'+
'</div>';
That newline after first P naturally makes sense, so I'd like to either
switch off that newline after P somehow or encapsulate every RTE line with
'|'+ wrap.
I found how to encapsulate whole RTE content:
myspecialjs.parseFunc_RTE < lib.parseFunc_RTE
myspecialjs.parseFunc_RTE.nonTypoTagStdWrap.wrap = '|'+
But I can't find how to encapsulate every line.
Any advices?
Martin
More information about the TYPO3-english
mailing list