More info on the linker process in rtehtmlarea (surely to be confirmed) :
1- click on a link in the browser element (files element)
2- call to link_folder function
3- call to editor.renderPopup_addLink function (see rtehtmlarea/htmlarea/plugins/TYPO3Browsers/typo3browsers.js)
At this stage of the process, urls are quite good. The letter case is taken into account :
[CODE]
HTMLArea.prototype.renderPopup_addLink = function(theLink,cur_target,cur_class,cur_title) {
// DEBUG
alert (theLink);
// DEBUG
var a, sel = null, range = null, node = null, imageNode = null;
this.focusEditor();
node = this.getParentElement();
var el = HTMLArea.getElementObject(node,"a");
if (el != null && el.tagName && el.tagName.toLowerCase() == "a") node = el;
if (node != null && node.tagName && node.tagName.toLowerCase() == "a") this.selectNode(node);
// Clean images from existing anchors otherwise Mozilla may create nested anchors
if (this.classesAnchorSetup) {
sel = this._getSelection();
range = this._createRange(sel);
this.cleanAllLinks(node, range, true);
}
this._doc.execCommand("CreateLink", false, theLink);
sel = this._getSelection();
range = this._createRange(sel);
node = this.getParentElement();
var el = HTMLArea.getElementObject(node,"a");
//DEBUG
alert (el);
//DEBUG
if (el != null && el.tagName && el.tagName.toLowerCase() == "a") node = el;
if (node) {
if (this.classesAnchorSetup && cur_class) {
for (var i = this.classesAnchorSetup.length; --i >= 0;) {
var anchorClass = this.classesAnchorSetup[i];
if(anchorClass['name'] == cur_class && anchorClass["image"]) {
imageNode = this._doc.createElement("img");
imageNode.src = anchorClass["image"];
imageNode.alt = anchorClass["altText"];
break;
}
}
}
// We may have created multiple links in as many blocks
this.setLinkAttributes(node, range, cur_target, cur_class, cur_title, imageNode);
}
Dialog._modal.close();
this.updateToolbar();
};
[/CODE]
The first alert, output the good URL, the second do not : instead, in our special case mentionned above, it returns the string in lowercase (the old)
The only function that I could not trace it this :
this._doc.execCommand("CreateLink", false, theLink);
It seems to not to be called (ie an "alert" in HTMLArea::_createLink () function don't output anything). I didn't understood that.
Any hint ?
Thx