Project

General

Profile

Actions

Bug #16434

closed

RTE config is not supported by HTMLArea RTE

Added by Dmitry Dulepov over 18 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2006-08-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The following TSConfig worked properly in the old RTE but does not work at all in new RTE. This config is made in accordance with TYPO3 documentation, so HTMLArea RTE is incompatible with core documentation.

RTE.classes {
  bodytext {
   name = Parasts teksts
   value = text-align: justify; padding: 0 5px 5px 5px; margin: 0 0; font-size: 12px; font-family: Tahoma,Arial;
  }
  autors {
   name = Autors
   value = font-style: italic; text-align: right; padding: 0 5px 5px 5px; margin: 0 0; font-size: 12px; font-family: Tahoma,Arial;
  }
}
RTE.default {
    classesParagraph = bodytext, autors
    hidePStyleItems = H6, P, PRE
    disableEnterParagraphs = 1
    enableWordClean = 1
    proc.internalizeFontTags = 0

    mainStyleOverride (
        P { text-align: justify; padding: 0 5px 5px 5px; margin: 0 0; font-size: 12px; font-family: Tahoma,Arial; }
        H1 { text-align: left; font-size: 20px; font-weight: bold; margin: 5px 0 7px 5px; font-family: Arial; }
        H2 { text-align: left; font-size: 18px; font-weight: bold; margin: 5px 0 7px 5px; font-family: Tahoma,Arial;}
        H3 { text-align: left; font-size: 16px; font-weight: bold; margin: 5px 0 7px 5px; font-family: Tahoma,Arial;}
        H4 { text-align: left; font-size: 14px; font-weight: bold; margin: 5px 0 7px 5px; font-family: Tahoma,Arial;}
        H5 { text-align: left; font-size: 12px; font-weight: bold; margin: 5px 0 7px 5px; font-family: Tahoma,Arial;}
        A { color: #6D6D6D; font-family: Tahoma,Arial; }
    )
  hideFontSizes = *
  hideFontFaces = *
  disableColorPicker = 1
  hideButtons = fontsize,textcolor,bgcolor,emoticons,fontstyle,left,center,right,image
}
RTE.config.tt_content.bodytext.proc {
  allowedClasses=H1, H2, H3, P, bodytext, autors
  denyTags=font, size, style
}

(issue imported from #M3983)

Actions #1

Updated by Andreas Wolf over 18 years ago

Well, I can't really reproduce this bug... Except for proc.internalizeFontTags, all listed configuration options appear in the documentation of rte_htmlarea, version 1.4.0. I didn't use all of them, but the ones I used worked. I remember to use RTE.classes and RTE.default { classesParagraph, hidePStyleItems, enableWordClean, hideButtons }.

Perhaps you are a victim of bug 3544? This bug really confused me when I tried to setup the RTE and nothing worked as expected...

Actions #2

Updated by Dmitry Dulepov over 18 years ago

When you wrote that you cannot reproduce it, does that mean that you tried? :) Or you just checked docs? If options are in docs, it does mean they work.

I can say that this configuration worked perfectly in the old rte but does not work in htmlarea. It must work there, otherwise htmlarea is incompatible with official typo3 rte api.

This has nothing to do with 3544 because 3544 is a known workspace-related problem and awaits its own fix.

Actions #3

Updated by Andreas Wolf over 18 years ago

Hello Dmitry,

I have three or four installations at work that use these options - and all of them work, be sure. If they didn't, my colleagues would surely have given me a soft hint on that ;)

I was not sure about all the options being in the docs, so I checked them - and I am sure that most of them are in use in my configuration. I don't have access to the config now, but I can post it here tomorrow.

And btw., 3544 has a fix - the one I have uploaded ;) Otherwise - as I said - my colleagues would have given me a hint... ;)

Actions #4

Updated by Stanislas Rolland over 18 years ago

Please explain what part of this configuration is not working... or what behavior is not as expected.

Actions #5

Updated by Dmitry Dulepov over 18 years ago

I though I explained quite clearly: this configuration works with old rte and does not work with new.

Take, for example, 3.8.1 and old RTE, see with this config: it will provide "bodytext" and "autors" styles. Take 4.0 with htmlarea, there will be no such classes.

Since with configuration is fully ok according to section 5 of "TYPO3 core APIs" but does not work in htmlarea, I assume htmlarea does not implement the spec fully.

I can give you an account if you do not believe that it does not work and want to see it.

Actions #6

Updated by Andreas Wolf over 18 years ago

I also use the RTE.classes-option, but here it is working. The exact configuration:

RTE.classes {
aufzaehlungspunkt {
name = Aufzählungspunkt
}
syntax {
name = Syntax
value = font-family:Courier,fixed-width;
}
klein {
name = Kleine Schrift
}
box-hinweis {
name = Box Achtung
value = background-color:#FFFFD8;
}
box-warnung {
name = Box Warnung
value = background-color:#FFD8D8;
}
box-info {
name = Box Info
value = background-color:#D8D8FF;
}
}

RTE.default {
contentCSS = fileadmin/templates/css/rte.css
classesParagraph = syntax, klein, box-hinweis, box-warnung, box-info
classesCharacter = gross, syntax, klein
[...]
}

This is working, definitely. But I remember to have had such problems once, but that was rather long ago (a few months, at least). Perhaps your version of HTMLarea-RTE has a bug? Did you include a CSS-file? Perhaps it won't work without...

Actions #7

Updated by Dmitry Dulepov over 18 years ago

Andreas, I need not to include any css files according to official RTE specification! It should work without it or it is incompatibile with specification!

Actions #8

Updated by Andreas Wolf over 18 years ago

You are right, if it is specified to work without, it has to work without. But just test it so you can tell if this was the reason or not - this should also help Stanislas to fix the bug.

Actions #9

Updated by Dmitry Dulepov over 18 years ago

It works with file but it is supposed to work without. Htmlarea is not the only TYPO3 RTE but each RTE is supposed to be compatible with spec. Admin should be able to use any RTE with the same config and get selection of the same styles.

Actions #10

Updated by Mark Oudsen almost 18 years ago

This issue only appears in the standard version of the htmlArea extension that is delivered with the tar.gz package from the downloads area.
Upgrade to version 1.4.3+ to get rid of the mentioned problems ...
So far all options appear to be picked up by the htmlArea plugin? Please check your version, upgrade and try again. Let us know if this solved the problems.

Actions #11

Updated by Stanislas Rolland almost 17 years ago

@Dmitry Dulepov: I think you're right. In the case of htmlArea RTE, if no css file is provided, you need to provide the CSS code for classes bodytext and authors in property RTE.default.inlineStyle.[any-keystring]

Actions #12

Updated by Matthew almost 17 years ago

I can confirm that there is a bug in 4.1.5 (using v1.5.5 rtehtmlarea) but not in 4.1.1(using v1.5.2 rtehtmlarea)

Using very simple RTE:

RTE.default.contentCSS = fileadmin/css/rte.css
RTE.default.showTagFreeClasses = 1

This code does not work in 4.1.5 using the supplied v1.5.5 rtehtmlarea.

Downgrading the v1.5.5 to v1.5.2 allows the above RTE config to work.

Matthew

Actions #13

Updated by Stanislas Rolland almost 17 years ago

@Matthew : I think something is wrong in your installation. There was no change in these features between 4.1.1 and 4.1.5.

Clear all files in typo3temp starting with rtehtmlarea_.
Clear your browser cache.

When reporting issues please indicate the browser(s) in which the issue is experienced.

Finally, please do not report an issue as a note on another one that has no relation with yours.

Actions #14

Updated by Stanislas Rolland almost 17 years ago

I see no solution to this issue other than to say that the specifications changed as of TYPO3 4.0. Since then a css file is indeed required, and this is not about to change.

Perhaps we could include a warning in the Update Wizard of the Install Tool when upgrading from a version earlier than 4.0? Would this be useful? Otherwise I will have to close the issue.

Actions #15

Updated by Dmitry Dulepov over 16 years ago

I think we should update core documentation. If specifications changes, it should be updated. Then this bug report will become obsolete. Can you update the core spec?

Actions #16

Updated by Tobi over 16 years ago

Hi Dmitry,
i´ve got the same problem with the new rte(1.7.0) in typo3 4.2beta1.
My following TS is completly ignored by the RTE. In other versions of the RTE this configuration works well:

  • RTE Classe des Interface (Ausrichtung)
    RTE.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;
    }
    }
  1. *** Entfernt das Bild vor den Links
    RTE.classesAnchor {
    internalLink {
    class = internal-link
    type = page
    image >
    }
    externalLink {
    class = external-link
    type = url
    image >
    }
    externalLinkInNewWindow {
    class = external-link-new-window
    type = url
    image >
    }
    internalLinkInNewWindow {
    class = internal-link-new-window
    type = page
    image >
    }
    download {
    class = download
    type = file
    image >
    }
    mail {
    class = mail
    type = mail
    image >
    }
    }

RTE.default {

  1. Zuweisung der CSS-Datei
    contentCSS = fileadmin/media/css/rte.css
  1. Tabellen Styles
    classesTable = contenttable, downloadtable
  1. Markup options
    enableWordClean = 1
    removeTrailingBR = 1
    removeComments = 1
    removeTags = center, sdfield
    removeTagsAndContents = style,script
    1. Buttons die gezeigt/versteckt werden
      showButtons = formatblock,blockstyle, blockstylelabel,strikethrough, bold, italic, underline, left, center, right, orderedlist, unorderedlist, insertcharacter, line, link, image, removeformat, table, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, columninsertbefore, columninsertafter, columndelete, columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge, findreplace, insertcharacter, undo, redo, showhelp, chMode, about
      hideButtons = fontsize,textstylelabel,textstyle, fontstyle, lefttoright, righttoleft, textcolor, bgcolor, textindicator, emoticon, user, spellcheck, inserttag, outdent, indent, justifyfull, subscript, superscript, acronym, copy, cut, paste
    1. Ausblenden von Items
      hidePStyleItems = PRE, ADDRESS
    1. Hält die RTE Icons gegroupt zusammen
      keepButtonGroupTogether = 0
    1. blendet Statusbar in htmlarea aus
      showStatusBar = 1
    1. Add styles Left, center and right alignment of text in paragraphs and cells.
      inlineStyle.text-alignment (
      p.align-left, h1.align-left, h2.align-left, h3.align-left, h4.align-left, h5.align-left, h6.align-left, td.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, td.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, td.align-right { text-align: right; }
      )
    1. Use stylesheet file rather than the above mainStyleOverride and inlineStyle properties to style the contents (htmlArea RTE only)
      ignoreMainStyleOverride = 1

    proc { # tags die erlaubt / verboten sind
    allowTags = table, tbody, thead, tr, th, td, h1, h2, h3, h4, h5, h6, div, p, br, span, ul, ol, li, re, blockquote, strong, em, b, i, u, sub, sup, strike, a, img, nobr, hr, tt, q, cite, abbr, acronym, center
    denyTags = font

    1. br wird nicht zu p konvertiert
      dontConvBRtoParagraph = 1
    1. tags sind erlaubt außerhalt von p, div
      allowTagsOutside = img,hr
    1. erlaubte attribute in p, div tags
      keepPDIVattribs = align,class,style,id
    1. List all class selectors that are allowed on the way to the database
      allowedClasses (
      external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail,
      align-left, align-center, align-right, author
      )
    1. html parser einstellungen
      HTMLparser_rte {
      1. tags die erlaubt/verboten sind
        allowTags < RTE.default.proc.allowTags
        denyTags < RTE.default.proc.denyTags
      1. tags die untersagt sind
        removeTags = font
      1. entfernt html-kommentare
        removeComments = 1
      1. tags die nicht übereinstimmen werden nicht entfernt (protect / 1 / 0)
        keepNonMatchedTags = 0
        }
    1. Content to database
      entryHTMLparser_db = 1
      entryHTMLparser_db {
      1. tags die erlaubt/verboten sind
        allowTags < RTE.default.proc.allowTags
        denyTags < RTE.default.proc.denyTags
      1. CLEAN TAGS
        noAttrib = b, i, u, strike, sub, sup, strong, em, quote, blockquote, cite, tt, br, center

      rmTagIfNoAttrib = span,div,font

      1. htmlSpecialChars = 1
      1. align attribute werden erlaubt
        tags {
        p.fixAttrib.align.unset >
        p.allowedAttribs = class,style,align

        div.fixAttrib.align.unset >

        hr.allowedAttribs = class

        1. b und i tags werden ersetzt (em / strong)
          b.remap = strong
          i.remap = em
        1. img tags werden erlaubt
          img >
          }
          }

    }

    1. Classes: Ausrichtung
      classesParagraph (
      align-left, align-center, align-right
      )
    1. Classes: Eigene Stile
      classesCharacter = mainBodyText
      classesImage=
      1. Classes für Links (These classes should also be in the list of allowedClasses)
        classesAnchor = pfeillink, pdflink
        classesAnchor.default {
        page = pfeillink
        url = pfeillink
        file = pdflink
        mail = pdflink
        }
    1. zeigt alle CSS-Klassen die in formate.css vorhanden sind
      showTagFreeClasses = 0
    1. Do not allow insertion of the following tags
      hideTags = font
    1. Tabellen Optionen in der RTE Toolbar
      hideTableOperationsInToolbar = 0
      keepToggleBordersInToolbar = 1
    1. Tabellen Editierungs-Optionen (cellspacing/ cellpadding / border)
      disableSpacingFieldsetInTableOperations = 1
      disableAlignmentFieldsetInTableOperations=1
      disableColorFieldsetInTableOperations=1
      disableLayoutFieldsetInTableOperations=1
      disableBordersFieldsetInTableOperations=0
      }
  1. Use same processing as on entry to database to clean content pasted into the editor
    RTE.default.enableWordClean.HTMLparser < RTE.default.proc.entryHTMLparser_db
  1. FE RTE configuration (htmlArea RTE only)
    RTE.default.FE < RTE.default
    RTE.default.FE.userElements >
    RTE.default.FE.userLinks >
  1. Breite des RTE in Fullscreen-Ansicht
    TCEFORM.tt_content.bodytext.RTEfullScreenWidth= 80%
  1. Für underline Tag nötig

RTE.default.proc.entryHTMLparser_db.removeTags = removeFromList(u)

Actions #17

Updated by Stanislas Rolland over 16 years ago

@Dmitry Dulepov: Please tell me what document you are refering to?

Actions #18

Updated by Tobi over 16 years ago

hidePStyleItems doesnt work too :-(

Actions #19

Updated by Stanislas Rolland over 16 years ago

@Pierschel: Please do not steal this issue. Obviously, the problem you are experiencing is not related to this one. If you think there is bug, please open a new issue.

Actions #20

Updated by Stanislas Rolland over 16 years ago

The hidePStyleItems issue has been solved in TYPO3 4.2. See issue #7857. Would be a good practice to use lower case for tag names.

Actions #21

Updated by Stanislas Rolland over 16 years ago

Closing this issue because the documentation of htmlArea RTE is very clear on the subject of css files.

Actions

Also available in: Atom PDF