Ich versuche nun schon seit 2 Tagen den RTE dazu zu bewegen <code> Tags richtig auszugeben.
In die db parsed er es zumindest schon mal halbwegs richtig, also etwa so
<code>
<div>function doSomeThing(){</div>
<div> var form = $('.mailform > form')[0];</div>
<div> var baseURL = $('base')[0].href,</div>
<div> commentList = $('.commentListListing'),</div>
<div> lastComment = commentList.find('.item:last')[0];</div>
... usw
</code>
Meine Aktuelle PageTS für den RTE
# Add ability for <code> element
# if you like to change the tag name you can define some TypoScript analogical to this one
# keep in mind to edit the TypoScript template configuration as well
RTE.default {
proc {
overruleMode = tx_vjrtecodesnippets,ts_css,cleanenc
allowTagsOutside=img,hr,code
externalBlocks=ul,ol,dl,dd,dt,table,code
entryHTMLparser_db {
allowTags < RTE.default.proc.allowTags
allowTagsOutside < RTE.default.proc.allowTagsOutside
externalBlocks < RTE.default.proc.externalBlocks
}
HTMLparser_rte {
allowTags < RTE.default.proc.allowTags
allowTagsOutside < RTE.default.proc.allowTagsOutside
externalBlocks < RTE.default.proc.externalBlocks
}
}
## Additional Buttons for RTE
showButtons := addToList(user)
#
# Userelement <code>
#
userElements.10.7 = SourceCode
userElements.10.7 {
title = SourceCode
description = Syntax highlighting with GeSHi
mode = wrap
content = <code language="php" extralines="" startline="1" url="" downloadtitle="">|</code>
}
}
mein Setup für RTE
RTE.default {
proc {
overruleMode = tx_vjrtecodesnippets,ts_css,cleanenc
allowTagsOutside=img,hr,code
externalBlocks=ul,ol,dl,dd,dt,table,code
entryHTMLparser_db {
allowTags < RTE.default.proc.allowTags
allowTagsOutside < RTE.default.proc.allowTagsOutside
externalBlocks < RTE.default.proc.externalBlocks
}
HTMLparser_rte {
allowTags < RTE.default.proc.allowTags
allowTagsOutside < RTE.default.proc.allowTagsOutside
externalBlocks < RTE.default.proc.externalBlocks
}
}
## Additional Buttons for RTE
showButtons := addToList(user)
#
# Userelement <code>
#
userElements.10.7 = SourceCode
userElements.10.7 {
title = SourceCode
description = Syntax highlighting with GeSHi
mode = wrap
content = <code language="php" extralines="" startline="1" url="" downloadtitle="">|</code>
}
}
Im Frontend wird alles innerhalb der code-tags rausgeschmissen, was dann so aussieht
<code></code>
<div>function doSomeThing(){</div>
... usw
Mit Code Highlighting tut sich herzlich wenig
ich bin für jeden Tip herzlichst dankbar.
Gruß, Thomas
[EDIT]
Typo3 v 4.4.4
[EDIT 2]
OK, das war wohl ein browser cache Problem im Firefox. Der Code wird im FE nun richtig gewrapt. CodeHighlighting mit vjrtecodesnippets geht allerdings immer noch nicht. 🙁
Kann es sein, dass vjrtecodesnippets mit der aktuellen RTE Version inkompatibel ist?