[TYPO3-RTE] Editforms on-page: - SOLVED
Tapio Markula
tapio.markula at xetpoint.fi
Sat Sep 1 17:53:49 CEST 2007
Tapio Markula kirjoitti:
> Tapio Markula kirjoitti:
>> Hi
>>
>> Editforms on-page: in frontend editing doesn't work with tinyrte.
>> Any idea why?
>
>
> I found the problem:
>
> I compared JavaScripts - for some reason Typo3 generates parts of
> JavaScript incorrectly in frontend.
> Frontend rendering seems to parse the Javascript - and cause JavaScript
> syntax error here
>
> if (node.nodeName.toLowerCase() == "a"
> && tinyMCE.getAttrib(node, "href") != "") {
> curr=tinyMCE.getAttrib(node, "href");
> if(curr.indexOf('?id=')<0)
> ifcurrindexof="" mailto:="">-1) {
> act="mail";
> }
> Should be
>
> if(curr.indexOf("?id=")<0) {
> if(curr.indexOf("mailto:")>-1) {
> act="mail";
> }
> Well because of invalid JavaScript JS Interpreter can't handle the JS
>
Solved:
the JS had apparently some whitespace handling problem - maybe some
Linux tool causes instead of normal whitespace hidden weird code. I
rewrite some code and I took off all whitspace
// Typo3 has problem generating this in frontend when used
"Forms on page" - changed whitespace handling
if(curr.indexOf("?id")<0){if(curr.indexOf("http://")>-1)
act="url";
else if(curr.indexOf("mailto:")>-1)
act="mail";
else if(curr.indexOf("file:")>-1)
act="file";
That worked
More information about the TYPO3-project-rte
mailing list