Zum Inhalt springen

parseFunc_RTE <-> parseFunc

Erstellt am 18. Mai 2006 · Noch keine Antworten

Tags: Frage

blacki ·

Hi zusammen.

ich hab folgendes Problem mit Typo3.8 und dem alten RTE beziehungsweise der parseFunc

Im RTE eingegebener Text:

<div>Tom ist ein Kkleiner Junge und Tom will groß werden.</div>
<div>& nbsp;</div>
<div><strong>Wenn Tom mal groß ist will er:</strong></div>
<ul>
<li>Ein Auto haben</li>
<li>Eine Freundin haben</li>
<li>Und ein Haus</li></ul>
<div>& nbsp;</div>
<div>& nbsp;</div>
<div>Ausserdem möchte Tom gerne in Spanien Leben</div>
<div>& nbsp;</div>
<div><strong>Jetzt wo Tom noch klein ist:</strong></div>
<ul>
<li>Spielt er im Sandkasten</li>
<li>Fährt ein Bobby Car</li>
<li>und hält Mädchen für doof</li></ul>
<div>& nbsp;</div>

welcher nach dem speichern folgende Formatierung hat:

<p>Tom ist ein Kkleiner Junge und Tom will groß werden.</p>
<p> </p>
<p><strong>Wenn Tom mal groß ist will er:</strong></p>
<ul>
<li>Ein Auto haben</li>
<li>Eine Freundin haben</li>
<li>Und ein Haus</li></ul>
<p>& nbsp;</p>
<p>& nbsp;</p>
<p>Ausserdem möchte Tom gerne in Spanien Leben</p>
<p>& nbsp;</p>
<p><strong>Jetzt wo Tom noch klein ist:</strong></p>
<ul>
<li>Spielt er im Sandkasten</li>
<li>Fährt ein Bobby Car</li>
<li>und hält Mädchen für doof</li></ul>

Daraus macht mir Typo auf der Seite:

<div class="boxcontent"><p>Tom ist ein Kkleiner Junge und Tom will groß werden.
</p>
<p>& nbsp;</p>
<strong>Wenn Tom mal groß ist will er:</strong>
<p>& nbsp;</p><ul>
<li>Ein Auto haben</li>
<li>Eine Freundin haben</li>
<li>Und ein Haus</li></ul><p>& nbsp;</p>
<p>& nbsp;</p>
<p>& nbsp;</p>
<p>Ausserdem möchte Tom gerne in Spanien Leben
</p>

<p>& nbsp;</p>
<strong>Jetzt wo Tom noch klein ist:</strong>
<p>& nbsp;</p><ul>
<li>Spielt er im Sandkasten</li>
<li>Fährt ein Bobby Car</li>
<li>und hält Mädchen für doof</li></ul><p>& nbsp;</p>
<p>& nbsp;</p></div>

Also werden die p tags um das Stron z.b. vernichtet und dafür erscheint direkt danach ein <p>& nbsp;</p>

Ich habe folgendes im TS Setup der Seite definiert:

#
# RTE Configuration
##############################
RTE.default {
  # Zuweisung der CSS-Datei
  contentCSS = {$CODE_Main_CSS}
  #
  ## Markup options
  #
  enableWordClean = 1
  removeTrailingBR = 1
  removeComments = 1
  removeTags = center, sdfield
  removeTagsAndContents = style,script  
  proc{

  }
}  

# frontendausgabe
lib.parseFunc {
  externalBlocks = table,li,ul
  allowTags = table, tbody, tr, th, td, col, h1, h2, h3, h4,h5, h6, p, br, div, span, ul, ol, li, pre, blockquote, strong, em, i,u, sub, sup, strike, a, link, img, nobr, hr, tt, q, cite, abbr, acronym,address, object, embed, param, map, area
  denyTags = *
  plainTextStdWrap = 
  nonTypoTagStdWrap = |
}

lib.parseFunc.nonTypoTagStdWrap.encapsLines {
 encapsTagList = p,div,b,strong
 remapTag.DIV = P
 remapTag.B = STRONG
 wrapNonWrappedLines = <p>|</p>
 innerStdWrap_all.ifEmpty =  

  # Forcing these attributes onto the encapsulation-tags if any
  addAttributes.P.class = bodytext
}

# RTE ausgabe
lib.parseFunc_RTE < lib.parseFunc

Eigentlich hätte ich ganz gerne das die Ausgabe auf der Seite mit der im RTE übereinstimmt, die ist soweit ja OK.

Was mach ich denn hier falsch ?