Antwort
 
LinkBack (1) Themen-Optionen Thema bewerten Ansicht
  #1  
Alt 08.03.06, 22:53
Benutzerbild von ben
ben ben ist offline
Forum Stammgast
 
Registriert seit: 07.03.05
Ort: Düsseldorf
Beiträge: 189
ben eine Nachricht über ICQ schicken

RTE: htmlarea, überschriften, <h1>-tags, spitze klammern


Hallo zusammen.

Bin sehr verwirrt, meine hier schon etwas darüber vorhin gefunden zu haben in der Suche, als ich nach etwas anderem guckte - aber war wohl doch nicht so.

Einfaches Problem: HTMLArea parst mir die Überschriften im Text-Feld nicht in HTML-Code, sondern gibt sie ganz normal aus. Der normale RTE macht damit keine Probleme, auch fett und kursiv funtkioniert mit HTML-Area. Aber die Überschriften werden eben einfach nicht geparst.

Hier dazu der Code:

Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
RTE.default.useCSS = 1
RTE.default.contentCSS = fileadmin/templates/basis/extensions/htmlarea.css

RTE.default.enableWordClean = 1
RTE.default.removeComments = 1

RTE.default.disableEnterParagraphs = 0

#fontstyle, fontsize werden ins html geschrieben, deshalb rausgenommen
#lefttoright, righttoleft nicht benötigt
#inserttag rausgenommen, damit redakteure damit keinen unsinn treiben
RTE.default.hideButtons = fontstyle, fontsize, lefttoright, righttoleft, inserttag
#PRE nicht benötigt, deshalb rausgenommen
#H1 aus semantischen Gründen rausgenommen (Überschrift Inhaltselemente ist schon h1)
RTE.default.hidePStyleItems = PRE

#Für sauberes html rausgenommen
RTE.default.hideTags = font, font (full)

# siehe oben ausführlich
RTE.default.showTagFreeClasses = 1
RTE.default.classesCharacter = roteSchrift, sehrGross
RTE.default.classesImage = blauerRand, 10pxAbstand
RTE.default.classesAnchor = intern, extern, mailto

RTE.config.tt_content.bodytext.proc.allowedClasses = roteSchrift, sehrGross

RTE.default.showStatusBar = 1

RTE.default.proc {









RTE.default.proc {
   // TRANSFORMATION METHOD
overruleMode = ts_css
   // LINES CONVERSION
dontConvBRtoParagraph = 1
   // BRING FONT TAGS INSIDE PARAGRAPHS
internalizeFontTags = 1
   // TAGS ALLOWED OUTSIDE P & DIV
allowTagsOutside = img, hr ,address, style, align
   // TAGS ALLOWED
allowTags = table, tbody, tr, th, td, h1, h2, h3, h4, h5, h6, div, p, br, span, ul, ol, li, pre, blockquote, strong, em, b, i, u, sub, sup, strike, a, img, nobr, hr, center, font, tt, q, cite, abbr, acronym, address, sdfield, style, text-align
   // TAGS DENIED
   # denyTags >
   // ALLOWED P & DIV ATTRIBUTES
keepPDIVattribs = class, style, align
   // ALLOWED CLASSES
   # allowedClasses = _
   // CONTENT TO DATABASE
entryHTMLparser_db = 1
entryHTMLparser_db {
     // TAGS ALLOWED
allowTags < RTE.default.proc.allowTags
     // XHTML COMPLIANCE
xhtml_cleaning = 1
     // AVOID TO HSC TWICE
htmlSpecialChars = 0
     // CLEAN TAGS
noAttrib = b, i, u, strike, sub, sup, strong, em, quote, blockquote, cite, tt,
tags.hr.allowedAttribs = class
     // REMAP B AND I TAGS
tags.b.remap = strong
tags.i.remap = em
     // REMOVE OPEN OFFICE META TAGS
removeTags = sdfield
     // PROTECT CUSTOM TAGS
keepNonMatchedTags = protect
} - ERROR: Line 75: The script is short of 2 end brace(s)

Vielen Dank schon mal im Vorraus.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #2  
Alt 09.03.06, 18:34
Forum Newbie
 
Registriert seit: 16.12.05
Ort: Erfurt
Alter: 48
Beiträge: 27

Hallo,

vielleicht hat dich dein RTE ja deshalb nicht lieb, weil du ihn mit fehlerhaftem TypoScript-Code fütterst. Eben das wird ja auch angemeckert, in dick und gelb am Ende deines Codes.

Das ist falsch:
Der Fehler beginnt in Zeile 30. Dort sagst du
RTE.default.proc {

In Zeile 40, also innerhalb von RTE.default.proc selbst, erteilst du denselben Befehl nochmal.

Dazu sind dann noch beide Klammern nicht geschlossen.

Korrektur (ohne Gewähr:sad:
1) Lösche die Zeile 30
2) Füge in die Zeile unterhalb deines jetzigen TS-Codes eine schließende geschweifte Klammer an.

Und nun hätte ich noch eine Frage: Ich kriege nie so richtig schön dick und fett gezeigt, was ich denn nun wieder vergessen habe. Wie kommt man denn zu diesen Fehlermeldungen?

Liebe Grüße, Uschi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #3  
Alt 10.03.06, 10:30
Benutzerbild von ben
ben ben ist offline
Forum Stammgast
 
Registriert seit: 07.03.05
Ort: Düsseldorf
Beiträge: 189
ben eine Nachricht über ICQ schicken

Hallo,

danke für die Antwort. Die Fehler kamen allerdings hier durchs Forum zu Stande, irgendwie ist die Typoscript eingabe etwas komisch. Zuerst zeigte er einfach überall Fehler an, danach habe ich nochmals editiert.

In Wahrheit sind da geine zwei RTE.default.proc { - Einträge. Es wird also immer noch nicht angezeigt.

Trotzdem vielen Dank

Ben~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #4  
Alt 13.03.06, 12:14
Benutzerbild von ben
ben ben ist offline
Forum Stammgast
 
Registriert seit: 07.03.05
Ort: Düsseldorf
Beiträge: 189
ben eine Nachricht über ICQ schicken

So hab nochmal einen Test gemacht, wenn ich die Überschriften im normalen Feld dafür setze werden die h1-Tags geparst und es wird die überschrift rausgeworfen. Nur die Überschriften, die htmlarea selber setzt, werden nicht verarbeitet... stattdessen erscheinen alle H1,H2,H3,Hx-Tags als Text..

Es muss also ein htmlarea Problem sein, aber wie kann ich das beheben?
Im Editor sehe ich die Überschriften richtig und kann die ja auch per Dropdown auswählen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #5  
Alt 17.03.06, 12:38
Benutzerbild von ben
ben ben ist offline
Forum Stammgast
 
Registriert seit: 07.03.05
Ort: Düsseldorf
Beiträge: 189
ben eine Nachricht über ICQ schicken

Hallo.
Ich komme immer erst langsam dazu, da weiterzumachen aber immerhin.

Wie ich jetzt gesehen habe, gibt er die spitzen Klammern tatsächlich als html-Code aus und setzt das ganze in einen Absatz. So der ausgegebene HTML Code der Seite:
HTML-Code:
<p>&lt;h1&gt;schnick schnack&lt;/h1&gt;</p>
Im HTML-Modus der HTMLArea macht er es natürlich nicht... Mhmm. Sonst funktioniert das bei allen? Irgendwie steh ich da aufm Schlauch....

Liebe Grüße,
Ben~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #6  
Alt 18.03.06, 11:14
Benutzerbild von ben
ben ben ist offline
Forum Stammgast
 
Registriert seit: 07.03.05
Ort: Düsseldorf
Beiträge: 189
ben eine Nachricht über ICQ schicken

So, ich habe es gelöst.

Ich wollte sehen, wie htmlArea die Überschriften in die DB schreibt. Dies hat es mit
HTML-Code:
<h1>Überschrift</h1>
richtig getan.

Es stellte sich mir die Frage, wieso es dann nicht richtig ausgegeben wird. Also habe ich mri angeschaut, wie der Default-RTE die Überschriften schreibt. Er tut dies mit
HTML-Code:
<typohead type="1">Überschrift</typohead>
(Wohlgemerkt: In die Datenbank, ausgegeben wird es normal!).

Daraufhin habe ich einfach die HTMLArea so konfiguriert, dass es die H-Tags ersetzt. Mit folgendem TSConfig werden dann alle Überschriften in der DB ersetzt, aber in der HTMLArea noch richtig angezeigt:

Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
RTE.default.useCSS = 1
RTE.default.contentCSS = fileadmin/templates/basis/extensions/htmlarea.css

RTE.default.enableWordClean = 0
RTE.default.removeComments = 0
RTE.default.disableEnterParagraphs = 0
#fontstyle, fontsize werden ins html geschrieben, deshalb rausgenommen
#lefttoright, righttoleft nicht benötigt
#inserttag rausgenommen, damit redakteure damit keinen unsinn treiben
RTE.default.hideButtons = fontstyle, fontsize, lefttoright, righttoleft, inserttag
#PRE nicht benötigt, deshalb rausgenommen
#H1 aus semantischen Gründen rausgenommen (Überschrift Inhaltselemente ist schon h1)
RTE.default.hidePStyleItems = PRE
#Für sauberes html rausgenommen
RTE.default.hideTags = font, font (full)
# siehe oben ausführlich
RTE.default.showTagFreeClasses = 1
RTE.default.classesCharacter = roteSchrift, sehrGross
RTE.default.classesImage = blauerRand, 10pxAbstand
RTE.default.classesAnchor = intern, extern, mailto
RTE.config.tt_content.bodytext.proc.allowedClasses = roteSchrift, sehrGross
RTE.default.showStatusBar = 1
## Default RTE processing rules
RTE.default.proc {
  ## TRANSFORMATION METHOD
  ## We assume that CSS Styled Content is used.
overruleMode = ts_css
  ## DO NOT CONVERT BR TAGS INTO LINEBREAKS
  ## br tags in the content are assumed to be intentional.
dontConvBRtoParagraph = 1
  ## REMAP DIV TAGS TO P TAGS
  ## For compatibility between Classic RTE and htmlArea RTE
remapParagraphTag = p
  ## TAGS ALLOWED OUTSIDE P & DIV
allowTagsOutside = hr, address
  ## TAGS ALLOWED
  ## Added to the default internal list: b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span
  ## But, for the sake of clarity, we use a complete list in alphabetic order.
  ## center, font, strike, sdfield and  u will be removed on entry (see below).
  ## b and i will be remapped on exit (see below).
  ## Note that the link accessibility feature of htmlArea RTE does insert img tags.
allowTags (
  a, abbr, acronym, address, blockquote, b, br, caption, cite, code, div, em,
  h1, h2, h3, h4, h5, h6, hr, i, img, li, link, ol, p, pre, q, sdfield,
  span, strong, sub, sup, table, tbody, td, th, tr, tt, ul
)
  ## TAGS DENIED
  ## Make sure we can set rules on any tag listed in allowTags.
denyTags >
  ## ALLOWED P & DIV ATTRIBUTES
  ## Attributes class and align are always preserved
  ## Align attribute will be unset on entry (see below)
  ## This is a list of additional attributes to keep
keepPDIVattribs = xml:lang
  ## CONTENT TO DATABASE
entryHTMLparser_db = 1
entryHTMLparser_db {
   ## TAGS ALLOWED
   ## Always use the same list of allowed tags.
allowTags < RTE.default.proc.allowTags
   ## TAGS DENIED
   ## Make sure we can set rules on any tag listed in allowTags.
denyTags >
   ## AVOID CONTENT BEING HSC'ed TWICE
htmlSpecialChars = 0

tags {
    ## REMOVE IMG TAGS
img.allowedAttribs = 0
img.rmTagIfNoAttrib = 1
    ## CLEAN ATTRIBUTES ON THE FOLLOWING TAGS
span.fixAttrib.style.unset = 1
p.fixAttrib.align.unset = 1
div.fixAttrib.align.unset = 1
hr.allowedAttribs = class
b.allowedAttribs = xml:lang
blockquote.allowedAttribs = xml:lang
cite.allowedAttribs = xml:lang
em.allowedAttribs = xml:lang
i.allowedAttribs = xml:lang
q.allowedAttribs = xml:lang
strong.allowedAttribs = xml:lang
sub.allowedAttribs = xml:lang
sup.allowedAttribs = xml:lang
tt.allowedAttribs = xml:lang
}
   ## REMOVE OPEN OFFICE META DATA TAGS AND DEPRECATED HTML TAGS
   ## We use this rule instead of the denyTags rule so that we can protect custom tags without protecting these unwanted tags.
removeTags = center, font, sdfield, strike, u
   ## PROTECT CUSTOM TAGS
keepNonMatchedTags = protect
}

HTMLparser_db {
   ## STRIP ALL ATTRIBUTES FROM THESE TAGS
   ## If this list of tags is not set, it will default to: b,i,u,br,center,hr,sub,sup,strong,em,li,ul,ol,blockquote,strike.
   ## However, we want to keep xml:lang attribute on most tags and tags from the default list where cleaned on entry.
noAttrib = br
   ## XHTML COMPLIANCE
   ## Note that applying xhtml_cleaning on exit would break non-standard attributes of typolink tags
xhtml_cleaning = 1
}

exitHTMLparser_db = 1
exitHTMLparser_db {
   ## REMAP B AND I TAGS
   ## b and i tags are used by Mozilla/Firefox in editing mode.
   ## This must be done on exit because the default HTMLparser_db parsing executes the reverse mapping.
tags.b.remap = strong
tags.i.remap = em
   ## KEEP ALL TAGS
   ## Unwanted tags were removed on entry.
   ## Without this rule, the parser will remove all tags! Presumably, this rule will be more efficient than repeating the allowTags rule
keepNonMatchedTags = 1
   ## AVOID CONTENT BEING HSC'ed TWICE
htmlSpecialChars = 0
}
}

## RTE processing rules for bodytext column of tt_content table
## Erase settings from other extensions
RTE.config.tt_content.bodytext >
## Make sure we use ts_css transformation
RTE.config.tt_content.bodytext.proc.overruleMode = ts_css
RTE.config.tt_content.bodytext.types.text.proc.overruleMode = ts_css
RTE.config.tt_content.bodytext.types.textpic.proc.overruleMode = ts_css

RTE.default.proc.entryHTMLparser_db = 1
RTE.default.proc.entryHTMLparser_db {
tags.h1.remap = typohead type="1"
tags.h2.remap = typohead type="2"
tags.h3.remap = typohead type="3"
tags.h4.remap = typohead type="4"
tags.h5.remap = typohead type="5"
tags.h6.remap = typohead type="6"
}

Und nun funktioniert es. Vielleicht kanns ja noch jemand gebrauchen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #7  
Alt 18.03.06, 11:25
Benutzerbild von ben
ben ben ist offline
Forum Stammgast
 
Registriert seit: 07.03.05
Ort: Düsseldorf
Beiträge: 189
ben eine Nachricht über ICQ schicken

Es funktioniert, aber nur fast.

Ich habe natürlich jetzt alle Überschriften getestet, klappt prima. Ich kann auch sämtliche Überschriften untereinander haben - es klappt.

Sobald ich allerdings einen Absatz normalen Text habe, werden alle Überschriften beim speichern rausgenommen und durch p-Tags ersetzt.

Ich werde hier mal weiter noch testen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #8  
Alt 27.03.06, 14:51
Benutzerbild von ben
ben ben ist offline
Forum Stammgast
 
Registriert seit: 07.03.05
Ort: Düsseldorf
Beiträge: 189
ben eine Nachricht über ICQ schicken

So, auch das habe ich gelöst.

So bringt man HTMLarea dazu, h-tags in typohead umzuwandeln und das auch zu akzeptieren:

Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
# tags sind erlaubt außerhalt von p, div
RTE.default.proc.allowTagsOutside = img,hr, typohead


RTE.default.proc.entryHTMLparser_db = 1
RTE.default.proc.entryHTMLparser_db {
tags.h1.remap = typohead type="1"
tags.h2.remap = typohead type="2"
tags.h3.remap = typohead type="3"
tags.h4.remap = typohead type="4"
tags.h5.remap = typohead type="5"
tags.h6.remap = typohead type="6"
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an