Zum Inhalt springen

RTE: Headlines bekommen ungewolltes <b>

Erstellt am 10. Dezember 2009 · 3 Antworten · letzte Antwort am 11. Dezember 2009

Tags: Frage

thomax ·

Hallo,

leider weiß ich keinen Rat mehr. Habe mit diversen Suchanfragen mit den Stichworten Überschrift, Headline, strong, bold, fat, fett, RTE, Wrap, Wrapper in allen möglichen Kombinationen keine Hilfe finden können.

Wenn ich im RTE einen Text eingebe und ihn als Überschrift markiere, wird neben <h1> bzw. <h2> oder <h3> noch ein <b> um diese gewrapped. Also werden standardmäßig alle Überschriften durch ein ungewolltes <b> fett gemacht.

Fettschrift kann ich zwar dann durch einen Klick auf den entsprechenden Button wieder entfernen, für unsere Redakteure ist das allerdings etwas zu viel Aufwand, auch noch darauf achten zu müssen.

Weiß jemand Rat, woher dieses ungewollte <b> kommt und wie ich es von vornherein verhindern kann?

Vielen Dank für alle Hinweise
Thomax

thomax ·

Hallo! Danke für die Antwort! Der Link ist super, habe direkt wieder einiges Neues erfahren und ihn natürlich sofort gebookmarkt.

Dies ist die TSConfig vom RTE:

[default]
 [proc]
  [overruleMode] = ts_css
  [dontConvBRtoParagraph] = 1
  [preserveDIVSections] = 1
  [allowTagsOutside] = hr, address
  [allowTags] =  a, abbr, acronym, address, b, bdo, big, blockquote, br, caption, center, cite, code, col, colgroup, del, dfn, div, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, meta, ol, p, pre, q, samp, sdfield, small, span, strike, strong, style, sub, sup, table, thead, tbody, tfoot, td, th, tr, title, tt, u, ul, var
  [keepPDIVattribs] = id, title, dir, lang, xml:lang
  [transformBoldAndItalicTags] = 1
  [dontUndoHSC_db] = 1
  [dontHSC_rte] = 1
  [entryHTMLparser_db] = 1
   [allowTags] =  a, abbr, acronym, address, b, bdo, big, blockquote, br, caption, center, cite, code, col, colgroup, del, dfn, div, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, meta, ol, p, pre, q, samp, sdfield, small, span, strike, strong, style, sub, sup, table, thead, tbody, tfoot, td, th, tr, title, tt, u, ul, var
   [htmlSpecialChars] = 0
   [tags]
    [img]
     [allowedAttribs] = 0
     [rmTagIfNoAttrib] = 1
    [span]
     [fixAttrib]
      [style]
       [unset] = 1
    [p]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [fixAttrib]
      [align]
       [unset] = 1
    [div]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [fixAttrib]
      [align]
       [unset] = 1
    [hr]
     [allowedAttribs] = class
    [b]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [bdo]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [big]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [blockquote]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [cite]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [code]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [del]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [dfn]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [em]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [i]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [ins]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [kbd]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [label]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [q]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [samp]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [small]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [strike]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [strong]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [sub]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [sup]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [tt]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [u]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [var]
     [allowedAttribs] = id, title, dir, lang, xml:lang, class
   [removeTags] = center, font, link, o:p, sdfield, meta, style, title, strike, u
   [keepNonMatchedTags] = protect
  [HTMLparser_db]
   [noAttrib] = br
   [xhtml_cleaning] = 1
  [exitHTMLparser_db] = 1
   [keepNonMatchedTags] = 1
   [htmlSpecialChars] = 0
  [allowedClasses] = test_style
 [FE]
  [proc]
   [overruleMode] = ts_css
   [dontConvBRtoParagraph] = 1
   [preserveDIVSections] = 1
   [allowTagsOutside] = hr, address
   [allowTags] =  a, abbr, acronym, address, b, bdo, big, blockquote, br, caption, center, cite, code, col, colgroup, del, dfn, div, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, meta, ol, p, pre, q, samp, sdfield, small, span, strike, strong, style, sub, sup, table, thead, tbody, tfoot, td, th, tr, title, tt, u, ul, var
   [keepPDIVattribs] = id, title, dir, lang, xml:lang
   [transformBoldAndItalicTags] = 1
   [dontUndoHSC_db] = 1
   [dontHSC_rte] = 1
   [entryHTMLparser_db] = 1
    [allowTags] =  a, abbr, acronym, address, b, bdo, big, blockquote, br, caption, center, cite, code, col, colgroup, del, dfn, div, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, meta, ol, p, pre, q, samp, sdfield, small, span, strike, strong, style, sub, sup, table, thead, tbody, tfoot, td, th, tr, title, tt, u, ul, var
    [htmlSpecialChars] = 0
    [tags]
     [img]
      [allowedAttribs] = 0
      [rmTagIfNoAttrib] = 1
     [span]
      [fixAttrib]
       [style]
        [unset] = 1
     [p]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
      [fixAttrib]
       [align]
        [unset] = 1
     [div]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
      [fixAttrib]
       [align]
        [unset] = 1
     [hr]
      [allowedAttribs] = class
     [b]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [bdo]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [big]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [blockquote]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [cite]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [code]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [del]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [dfn]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [em]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [i]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [ins]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [kbd]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [label]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [q]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [samp]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [small]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [strike]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [strong]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [sub]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [sup]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [tt]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [u]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
     [var]
      [allowedAttribs] = id, title, dir, lang, xml:lang, class
    [removeTags] = center, font, link, o:p, sdfield, meta, style, title, strike, u
    [keepNonMatchedTags] = protect
   [HTMLparser_db]
    [noAttrib] = br
    [xhtml_cleaning] = 1
   [exitHTMLparser_db] = 1
    [keepNonMatchedTags] = 1
    [htmlSpecialChars] = 0
   [allowedClasses] =  external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail, align-left, align-center, align-right, align-justify, csc-frame-frame1, csc-frame-frame2, component-items, action-items, component-items-ordered, action-items-ordered, important, name-of-person, detail, indent
  [enableWordClean] = 1
  [removeTrailingBR] = 1
  [removeComments] = 1
  [removeTags] = center, font, o:p, sdfield, strike,u
  [removeTagsAndContents] = link, meta, script, style, title
  [showButtons] =  class, blockstylelabel, blockstyle, textstylelabel, textstyle, formatblock, bold, italic, subscript, superscript, orderedlist, unorderedlist, outdent, indent, textindicator, insertcharacter, link, table, findreplace, chMode, removeformat, undo, redo, about, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, columninsertbefore, columninsertafter, columndelete, columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
  [keepButtonGroupTogether] = 1
  [showStatusBar] = 0
  [hidePStyleItems] = pre,address
  [inlineStyle]
   [text-alignment] =  p.align-left, h1.align-left, h2.align-left, h3.align-left, h4.align-left, h5.align-left, h6.align-left, div.align-left, address.align-left { text-align: left; } p.align-center, h1.align-center, h2.align-center, h3.align-center, h4.align-center, h5.align-center, h6.align-center, div.align-center, address.align-center { text-align: center; } p.align-right, h1.align-right, h2.align-right, h3.align-right, h4.align-right, h5.align-right, h6.align-right, div.align-right, address.align-right { text-align: right; } p.align-justify, h1.align-justify, h2.align-justify, h3.align-justify, h4.align-justify, h5.align-justify, h6.align-justify, div.align-justify, address.align-justify { text-align: justify; }
   [frames] =  p.csc-frame-frame1, table.csc-frame-frame1 { background-color: #EDEBF1; padding: 2px 4px 2px 4px; border: 1px solid #333333; } p.csc-frame-frame2, table.csc-frame-frame2 { background-color: #F5FFAA; padding: 2px 4px 2px 4px; border: 1px solid #333333; }
   [ul] =  ul.component-items { color: #186900; list-style-type: circle; } ul.action-items { color: #8A0020; list-style-image: url(img/red_arrow_bullet.gif); }
   [ol] =  ol.component-items-ordered { color: #10007B; list-style-type: lower-roman; } ol.action-items-ordered { color: #8A0020; list-style-type: lower-greek; }
   [inline-text] =  span.important { color: #8A0020; } span.name-of-person { color: #10007B; } span.detail { color: #186900; }
   [accessibility] =  a.external-link {} a.external-link-new-window {} a.internal-link {} a.internal-link-new-window {} a.download {} a.mail {}
   [indentation] =  div.indent { margin-left: 2em; }
  [ignoreMainStyleOverride] = 1
  [classesParagraph] =  align-left, align-center, align-right, csc-frame-frame1, csc-frame-frame2
  [classesTable] = csc-frame-frame1, csc-frame-frame2
  [classesTD] = align-left, align-center, align-right
  [classesLinks] = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
  [classesCharacter] = important, name-of-person, detail
  [classesAnchor] = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
   [default]
    [page] = internal-link
    [url] = external-link-new-window
    [file] = download
    [mail] = mail
  [disableAlignmentFieldsetInTableOperations] = 1
  [disableSpacingFieldsetInTableOperations] = 1
  [disableColorFieldsetInTableOperations] = 1
  [disableLayoutFieldsetInTableOperations] = 1
  [disableBordersFieldsetInTableOperations] = 1
  [buttons]
   [toggleborders]
    [setOnTableCreation] = 1
   [bold]
    [hotKey] = b
   [italic]
    [hotKey] = i
  [hideButtons] = chMode, blockstyle, textstyle, underline, strikethrough, subscript, superscript, lefttoright, righttoleft, left, center, right, justifyfull, table, inserttag, findreplace, removeformat, copy, cut, paste
  [skin] = EXT:t3skin/rtehtmlarea/htmlarea.css
 [enableWordClean] = 1
 [removeTrailingBR] = 1
 [removeComments] = 1
 [removeTags] = center, font, o:p, sdfield, strike,u
 [removeTagsAndContents] = link, meta, script, style, title
 [showButtons] =  class, blockstylelabel, blockstyle, textstylelabel, textstyle, formatblock, bold, italic, subscript, superscript, orderedlist, unorderedlist, outdent, indent, textindicator, insertcharacter, link, table, findreplace, chMode, removeformat, undo, redo, about, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, columninsertbefore, columninsertafter, columndelete, columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
 [keepButtonGroupTogether] = 1
 [showStatusBar] = 1
 [hidePStyleItems] = pre,address
 [inlineStyle]
  [text-alignment] =  p.align-left, h1.align-left, h2.align-left, h3.align-left, h4.align-left, h5.align-left, h6.align-left, div.align-left, address.align-left { text-align: left; } p.align-center, h1.align-center, h2.align-center, h3.align-center, h4.align-center, h5.align-center, h6.align-center, div.align-center, address.align-center { text-align: center; } p.align-right, h1.align-right, h2.align-right, h3.align-right, h4.align-right, h5.align-right, h6.align-right, div.align-right, address.align-right { text-align: right; } p.align-justify, h1.align-justify, h2.align-justify, h3.align-justify, h4.align-justify, h5.align-justify, h6.align-justify, div.align-justify, address.align-justify { text-align: justify; }
  [frames] =  p.csc-frame-frame1, table.csc-frame-frame1 { background-color: #EDEBF1; padding: 2px 4px 2px 4px; border: 1px solid #333333; } p.csc-frame-frame2, table.csc-frame-frame2 { background-color: #F5FFAA; padding: 2px 4px 2px 4px; border: 1px solid #333333; }
  [ul] =  ul.component-items { color: #186900; list-style-type: circle; } ul.action-items { color: #8A0020; list-style-image: url(img/red_arrow_bullet.gif); }
  [ol] =  ol.component-items-ordered { color: #10007B; list-style-type: lower-roman; } ol.action-items-ordered { color: #8A0020; list-style-type: lower-greek; }
  [inline-text] =  span.important { color: #8A0020; } span.name-of-person { color: #10007B; } span.detail { color: #186900; }
  [accessibility] =  a.external-link {} a.external-link-new-window {} a.internal-link {} a.internal-link-new-window {} a.download {} a.mail {}
  [indentation] =  div.indent { margin-left: 2em; }
 [ignoreMainStyleOverride] = 1
 [classesParagraph] = test_style
 [classesTable] = csc-frame-frame1, csc-frame-frame2
 [classesTD] = align-left, align-center, align-right
 [classesLinks] = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
 [classesCharacter] = important, name-of-person, detail
 [classesAnchor] = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
  [default]
   [page] = internal-link
   [url] = external-link-new-window
   [file] = download
   [mail] = mail
 [disableAlignmentFieldsetInTableOperations] = 1
 [disableSpacingFieldsetInTableOperations] = 1
 [disableColorFieldsetInTableOperations] = 1
 [disableLayoutFieldsetInTableOperations] = 1
 [disableBordersFieldsetInTableOperations] = 1
 [buttons]
  [toggleborders]
   [setOnTableCreation] = 1
  [bold]
   [hotKey] = b
  [italic]
   [hotKey] = i
 [skin] = EXT:t3skin/rtehtmlarea/htmlarea.css
 [contentCSS] = fileadmin/templates/portal/css/rte.css
 [useCSS] = 1
 [showTagFreeClasses] = 1
[config]
 [tt_content]
  [bodytext]
   [proc]
    [overruleMode] = ts_css
   [types]
    [text]
     [proc]
      [overruleMode] = ts_css
    [textpic]
     [proc]
      [overruleMode] = ts_css
 [tt_news]
  [bodytext]
   [proc]
    [overruleMode] = ts_css
[classes]
 [align-left]
  [name] = LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyleft
  [value] = text-align: left;
 [align-center]
  [name] = LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifycenter
  [value] = text-align: center;
 [align-right]
  [name] = LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyright
  [value] = text-align: right;
 [csc-frame-frame1]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:frame-frame1
  [value] = background-color: #EDEBF1; border: 1px solid #333333;
 [csc-frame-frame2]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:frame-frame2
  [value] = background-color: #F5FFAA; border: 1px solid #333333;
 [important]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:important
  [value] = color: #8A0020;
 [name-of-person]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:name-of-person
  [value] = color: #10007B;
 [detail]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:detail
  [value] = color: #186900;
 [component-items]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:component-items
  [value] = color: #186900;
 [action-items]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:action-items
  [value] = color: #8A0020;
 [component-items-ordered]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:component-items
  [value] = color: #186900;
 [action-items-ordered]
  [name] = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:action-items
  [value] = color: #8A0020;
[classesAnchor]
 [externalLink]
  [class] = external-link
  [type] = url
  [titleText] = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:external_link_titleText
 [externalLinkInNewWindow]
  [class] = external-link-new-window
  [type] = url
  [titleText] = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:external_link_new_window_titleText
 [internalLink]
  [class] = internal-link
  [type] = page
  [titleText] = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:internal_link_titleText
 [internalLinkInNewWindow]
  [class] = internal-link-new-window
  [type] = page
  [titleText] = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:internal_link_new_window_titleText
 [download]
  [class] = download
  [type] = file
  [titleText] = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:download_titleText
 [mail]
  [class] = mail
  [type] = mail
  [titleText] = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:mail_titleText
froemken ·

Du hast da aber ein ganz schönes Durcheinander. Auf der einen Seite schreibst du Dir die Finger wund an diesen ganzen mainStyles und auf der anderen Seite ignorierst du sie dann und arbeitest auf einmal doch mit contentCSS. Dann erlaubst du den chMode, aber deaktivierst ihn direkt im nächsten Schritt mit hideButton. Im RTE im BE verwendest du keine showButtons aber dafür konfigurierst du sie im Frontend.

Es hätte gereicht, wenn du uns einfach per copy & paste die pageTSconfig aus den Seiteneigenschaften gegeben und uns gesagt hättest mit welcher Konfig (minimal, default, demo) du den RTE betreibst. Dann könnten wir das auch mal testen.

Derzeit empfehle ich Dir den Button chMode zu aktivieren. Damit kannst du schon im RTE sehen, wie der HTML-Code aufgebaut wird. Nicht das sich da ein <b></b> drin verlaufen hat.

Ansonsten hast du den Hotkey "b" aktiviert. Nicht das du beim Einfügen diese Taste mitgedrückt hast.

Stefan