Fixed bug #5907: RTE-Plugins: Use record specific RTEtsConfigParams
authorOliver Hader <oliver.hader@typo3.org>
Sat, 14 Jul 2007 14:13:45 +0000 (14:13 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 14 Jul 2007 14:13:45 +0000 (14:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-1@2415 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
typo3/sysext/rtehtmlarea/htmlarea/plugins/Acronym/acronym-compressed.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/Acronym/acronym.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/typo3browsers-compressed.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/typo3browsers.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser-compressed.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/UserElements/user-elements-compressed.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/UserElements/user-elements.js

index c782274..33108cf 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #5704: IRRE - Children on the table pages get the pid of the parent page in pagetree
        * Fixed bug #5718: IRRE - Copying a page with related child records leads to duplicates of each children
+       * Fixed bug #5907: RTE-Plugins: Use record specific RTEtsConfigParams
 
 2007-07-13  Oliver Hader  <oh@inpublica.de>
 
index 96afea3..17bb2fe 100644 (file)
@@ -910,6 +910,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                $registerRTEinJSString = (!is_object($TSFE) ? '' : '
                        ' . '/*<![CDATA[*/') . '
                        RTEarea['.$number.'] = new Object();
+                       RTEarea['.$number.']["RTEtsConfigParams"] = "&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams()) . '";
                        RTEarea['.$number.']["number"] = '.$number.';
                        RTEarea['.$number.']["id"] = "RTEarea'.$number.'";
                        RTEarea['.$number.']["enableWordClean"] = ' . (trim($this->thisConfig['enableWordClean'])?'true':'false') . ';
index 6e42c31..5c600f5 100644 (file)
@@ -1,2 +1,2 @@
-Acronym=function(editor){this.editor=editor;var cfg=editor.config;var actionHandlerFunctRef=Acronym.actionHandler(this);cfg.registerButton("Acronym",Acronym_langArray["Insert/Modify Acronym"],editor.imgURL("ed_acronym.gif","Acronym"),false,actionHandlerFunctRef);};Acronym.I18N=Acronym_langArray;Acronym._pluginInfo={name:"Acronym",version:"1.4",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};Acronym.actionHandler=function(instance){return(function(editor){instance.buttonPress(editor);});};Acronym.prototype.buttonPress=function(editor){var editorNo=editor._doc._editorNo;var backreturn;var addUrlParams="?"+RTEarea[0]["RTEtsConfigParams"];editor._popupDialog(RTEarea[0]["pathAcronymModule"]+addUrlParams+"&editorNo="+editorNo,null,null,570,280);return false;};
 
+Acronym=function(editor){this.editor=editor;var cfg=editor.config;var actionHandlerFunctRef=Acronym.actionHandler(this);cfg.registerButton("Acronym",Acronym_langArray["Insert/Modify Acronym"],editor.imgURL("ed_acronym.gif","Acronym"),false,actionHandlerFunctRef);};Acronym.I18N=Acronym_langArray;Acronym._pluginInfo={name:"Acronym",version:"1.4",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};Acronym.actionHandler=function(instance){return(function(editor){instance.buttonPress(editor);});};Acronym.prototype.buttonPress=function(editor){var editorNo=editor._doc._editorNo;var backreturn;var addUrlParams="?"+RTEarea[editorNo]["RTEtsConfigParams"];editor._popupDialog(RTEarea[0]["pathAcronymModule"]+addUrlParams+"&editorNo="+editorNo,null,null,570,280);return false;};
\ No newline at end of file
index 1304007..2512372 100644 (file)
@@ -63,7 +63,7 @@ Acronym.actionHandler = function(instance) {
 Acronym.prototype.buttonPress = function(editor) {
        var editorNo = editor._doc._editorNo;
        var backreturn;
-       var addUrlParams = "?" + RTEarea[0]["RTEtsConfigParams"];
+       var addUrlParams = "?" + RTEarea[editorNo]["RTEtsConfigParams"];
        editor._popupDialog(RTEarea[0]["pathAcronymModule"] + addUrlParams + "&editorNo=" + editorNo, null, null, 570, 280);
        return false;
 };
index 42543b1..84a1617 100644 (file)
@@ -1,2 +1,13 @@
-TYPO3Browsers=function(editor,args){this.editor=editor;var cfg=this.editor.config;cfg.btnList.InsertImage[1]=this.editor.imgURL("ed_image.gif","TYPO3Browsers");cfg.btnList.CreateLink[1]=this.editor.imgURL("ed_link.gif","TYPO3Browsers");};TYPO3Browsers.I18N=TYPO3Browsers_langArray;TYPO3Browsers._pluginInfo={name:"TYPO3Browsers",version:"1.7",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};HTMLArea.prototype.renderPopup_image=function(){var editorNumber=this._editorNumber,backreturn,addParams="?"+RTEarea[0]["RTEtsConfigParams"],image=this.getParentElement();this._selectedImage=null;if(image&&image.tagName.toLowerCase()=="img"){addParams="?act=image"+RTEarea[0]["RTEtsConfigParams"];this._selectedImage=image;};this._popupDialog(RTEarea[0]["pathImageModule"]+addParams+"&editorNo="+editorNumber+"&sys_language_content="+RTEarea[editorNumber]["sys_language_content"],null,backreturn,550,350,null,"yes");return false;};HTMLArea.prototype.renderPopup_insertImage=function(image){this.focusEditor();this.insertHTML(image);this._selectedImage=null;Dialog._modal.close();this.updateToolbar();};HTMLArea.prototype.renderPopup_link=function(){var editorNumber=this._editorNumber,addUrlParams="?"+RTEarea[0]["RTEtsConfigParams"],backreturn,sel=this.getParentElement();if(RTEarea[editorNumber]["classesAnchorUrl"]&&!this.classesAnchorSetup){var classesAnchorData=HTMLArea._getScript(0,false,RTEarea[editorNumber]["classesAnchorUrl"]);var editor=this;if(classesAnchorData)eval(classesAnchorData);editor=null;};var el=HTMLArea.getElementObject(sel,"a");if(el!=null&&el.tagName&&el.tagName.toLowerCase()=="a")sel=el;if(sel!=null&&sel.tagName&&sel.tagName.toLowerCase()=="a"){addUrlParams="?curUrl[href]="+encodeURIComponent(sel.getAttribute("href"));addUrlParams+="&curUrl[typo3ContentLanguage]="+RTEarea[editorNumber]["typo3ContentLanguage"];addUrlParams+="&curUrl[typo3ContentCharset]="+RTEarea[editorNumber]["typo3ContentCharset"];if(sel.target)addUrlParams+="&curUrl[target]="+encodeURIComponent(sel.target);if(sel.className)addUrlParams+="&curUrl[class]="+encodeURIComponent(sel.className);if(sel.title)addUrlParams+="&curUrl[title]="+encodeURIComponent(sel.title);addUrlParams+=RTEarea[0]["RTEtsConfigParams"];}else if(this.hasSelectedText()){var text=this.getSelectedHTML();if(text&&text!=null){var offset=text.toLowerCase().indexOf("<a");if(offset!=-1){var ATagContent=text.substring(offset+2);offset=ATagContent.toUpperCase().indexOf(">");ATagContent=ATagContent.substring(0,offset);addUrlParams="?curUrl[all]="+encodeURIComponent(ATagContent);addUrlParams+=RTEarea[0]["RTEtsConfigParams"];}}};this._popupDialog(RTEarea[0]["pathLinkModule"]+addUrlParams+"&editorNo="+editorNumber+"&typo3ContentLanguage="+RTEarea[editorNumber]["typo3ContentLanguage"]+"&typo3ContentCharset="+encodeURIComponent(RTEarea[editorNumber]["typo3ContentCharset"]),null,backreturn,550,350,null,"yes");return false;};HTMLArea.prototype.renderPopup_addLink=function(theLink,cur_target,cur_class,cur_title){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);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");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;}}};this.setLinkAttributes(node,range,cur_target,cur_class,cur_title,imageNode);};Dialog._modal.close();this.updateToolbar();};HTMLArea.prototype.setLinkAttributes=function(node,range,cur_target,cur_class,cur_title,imageNode){if(node.tagName&&node.tagName.toLowerCase()=="a"){var nodeInRange=false;if(HTMLArea.is_gecko){if(!HTMLArea.is_safari&&!HTMLArea.is_opera)nodeInRange=range.intersectsNode(node);else nodeInRange=true;}else{if(this._getSelection().type.toLowerCase()=="control"){nodeInRange=true;}else{var nodeRange=this._doc.body.createTextRange();nodeRange.moveToElementText(node);nodeInRange=range.inRange(nodeRange)||(range.compareEndPoints("StartToStart",nodeRange)==0)||(range.compareEndPoints("EndToEnd",nodeRange)==0);}};if(nodeInRange){if(imageNode!=null)node.insertBefore(imageNode.cloneNode(false),node.firstChild);if(cur_target.trim())node.target=cur_target.trim();else node.removeAttribute("target");if(cur_class.trim()){node.className=cur_class.trim();}else{if(HTMLArea.is_gecko)node.removeAttribute('class');else node.removeAttribute('className');};if(cur_title.trim()){node.title=cur_title.trim();}else{node.removeAttribute("title");node.removeAttribute("rtekeep");}}}else{for(var i=node.firstChild;i;i=i.nextSibling){if(i.nodeType==1||i.nodeType==11)this.setLinkAttributes(i,range,cur_target,cur_class,cur_title,imageNode);}}};HTMLArea.prototype.cleanClassesAnchorImages=function(node){var nodeArray=[],splitArray1=[],splitArray2=[];for(var childNode=node.firstChild;childNode;childNode=childNode.nextSibling){if(childNode.tagName&&childNode.tagName.toLowerCase()=="img"){splitArray1=childNode.src.split("/");for(var i=this.classesAnchorSetup.length;--i>=0;){if(this.classesAnchorSetup[i]["image"]){splitArray2=this.classesAnchorSetup[i]["image"].split("/");if(splitArray1[splitArray1.length-1]==splitArray2[splitArray2.length-1]){nodeArray.push(childNode);break;}}}}};for(i=nodeArray.length;--i>=0;){node.removeChild(nodeArray[i]);}};HTMLArea.prototype.cleanAllLinks=function(node,range,keepLinks){if(node.tagName&&node.tagName.toLowerCase()=="a"){var intersection=false;if(HTMLArea.is_gecko){if(!HTMLArea.is_safari&&!HTMLArea.is_opera)intersection=range.intersectsNode(node);else intersection=true;}else{if(this._getSelection().type.toLowerCase()=="control"){intersection=true;}else{var nodeRange=this._doc.body.createTextRange();nodeRange.moveToElementText(node);intersection=range.inRange(nodeRange)||((range.compareEndPoints("StartToStart",nodeRange)>0)&&(range.compareEndPoints("StartToEnd",nodeRange)<0))||((range.compareEndPoints("EndToStart",nodeRange)>0)&&(range.compareEndPoints("EndToEnd",nodeRange)<0));}};if(intersection){this.cleanClassesAnchorImages(node);if(!keepLinks){while(node.firstChild)node.parentNode.insertBefore(node.firstChild,node);node.parentNode.removeChild(node);}}}else{for(var i=node.firstChild;i;i=i.nextSibling){if(i.nodeType==1||i.nodeType==11)this.cleanAllLinks(i,range,keepLinks);}}};HTMLArea.prototype.renderPopup_unLink=function(){this.focusEditor();var 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);if(this.classesAnchorSetup){var sel=this._getSelection();var range=this._createRange(sel);if(HTMLArea.is_gecko){this.cleanAllLinks(node,range,false);}else{this.cleanAllLinks(node,range,true);this._doc.execCommand("Unlink",false,"");}}else{this._doc.execCommand("Unlink",false,"");};if(Dialog._modal)Dialog._modal.close();};HTMLArea.prototype.nonStripBaseURL=function(url){return url;};TYPO3Browsers.prototype.onGenerate=function(){var editor=this.editor;editor._insertImage=editor.renderPopup_image;editor._createLink=editor.renderPopup_link;editor.stripBaseURL=editor.nonStripBaseURL;};
 
+TYPO3Browsers=function(editor,args){this.editor=editor;var cfg=this.editor.config;cfg.btnList.InsertImage[1]=this.editor.imgURL("ed_image.gif","TYPO3Browsers");cfg.btnList.CreateLink[1]=this.editor.imgURL("ed_link.gif","TYPO3Browsers");};TYPO3Browsers.I18N=TYPO3Browsers_langArray;TYPO3Browsers._pluginInfo={name:"TYPO3Browsers",version:"1.7",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};HTMLArea.prototype.renderPopup_image=function(){var editorNumber=this._editorNumber,backreturn,addParams="?"+RTEarea[editorNumber]["RTEtsConfigParams"],image=this.getParentElement();this._selectedImage=null;if(image&&image.tagName.toLowerCase()=="img"){addParams="?act=image"+RTEarea[editorNumber]["RTEtsConfigParams"];this._selectedImage=image;}
+this._popupDialog(RTEarea[0]["pathImageModule"]+addParams+"&editorNo="+editorNumber+"&sys_language_content="+RTEarea[editorNumber]["sys_language_content"],null,backreturn,550,350,null,"yes");return false;};HTMLArea.prototype.renderPopup_insertImage=function(image){this.focusEditor();this.insertHTML(image);this._selectedImage=null;Dialog._modal.close();this.updateToolbar();};HTMLArea.prototype.renderPopup_link=function(){var editorNumber=this._editorNumber,addUrlParams="?"+RTEarea[editorNumber]["RTEtsConfigParams"],backreturn,sel=this.getParentElement();if(RTEarea[editorNumber]["classesAnchorUrl"]&&!this.classesAnchorSetup){var classesAnchorData=HTMLArea._getScript(0,false,RTEarea[editorNumber]["classesAnchorUrl"]);var editor=this;if(classesAnchorData)eval(classesAnchorData);editor=null;}
+var el=HTMLArea.getElementObject(sel,"a");if(el!=null&&el.tagName&&el.tagName.toLowerCase()=="a")sel=el;if(sel!=null&&sel.tagName&&sel.tagName.toLowerCase()=="a"){addUrlParams="?curUrl[href]="+encodeURIComponent(sel.getAttribute("href"));addUrlParams+="&curUrl[typo3ContentLanguage]="+RTEarea[editorNumber]["typo3ContentLanguage"];addUrlParams+="&curUrl[typo3ContentCharset]="+RTEarea[editorNumber]["typo3ContentCharset"];if(sel.target)addUrlParams+="&curUrl[target]="+encodeURIComponent(sel.target);if(sel.className)addUrlParams+="&curUrl[class]="+encodeURIComponent(sel.className);if(sel.title)addUrlParams+="&curUrl[title]="+encodeURIComponent(sel.title);addUrlParams+=RTEarea[editorNumber]["RTEtsConfigParams"];}else if(this.hasSelectedText()){var text=this.getSelectedHTML();if(text&&text!=null){var offset=text.toLowerCase().indexOf("<a");if(offset!=-1){var ATagContent=text.substring(offset+2);offset=ATagContent.toUpperCase().indexOf(">");ATagContent=ATagContent.substring(0,offset);addUrlParams="?curUrl[all]="+encodeURIComponent(ATagContent);addUrlParams+=RTEarea[editorNumber]["RTEtsConfigParams"];}}}
+this._popupDialog(RTEarea[0]["pathLinkModule"]+addUrlParams+"&editorNo="+editorNumber+"&typo3ContentLanguage="+RTEarea[editorNumber]["typo3ContentLanguage"]+"&typo3ContentCharset="+encodeURIComponent(RTEarea[editorNumber]["typo3ContentCharset"]),null,backreturn,550,350,null,"yes");return false;};HTMLArea.prototype.renderPopup_addLink=function(theLink,cur_target,cur_class,cur_title){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);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");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;}}}
+this.setLinkAttributes(node,range,cur_target,cur_class,cur_title,imageNode);}
+Dialog._modal.close();this.updateToolbar();};HTMLArea.prototype.setLinkAttributes=function(node,range,cur_target,cur_class,cur_title,imageNode){if(node.tagName&&node.tagName.toLowerCase()=="a"){var nodeInRange=false;if(HTMLArea.is_gecko){if(!HTMLArea.is_safari&&!HTMLArea.is_opera)nodeInRange=range.intersectsNode(node);else nodeInRange=true;}else{if(this._getSelection().type.toLowerCase()=="control"){nodeInRange=true;}else{var nodeRange=this._doc.body.createTextRange();nodeRange.moveToElementText(node);nodeInRange=range.inRange(nodeRange)||(range.compareEndPoints("StartToStart",nodeRange)==0)||(range.compareEndPoints("EndToEnd",nodeRange)==0);}}
+if(nodeInRange){if(imageNode!=null)node.insertBefore(imageNode.cloneNode(false),node.firstChild);if(cur_target.trim())node.target=cur_target.trim();else node.removeAttribute("target");if(cur_class.trim()){node.className=cur_class.trim();}else{if(HTMLArea.is_gecko)node.removeAttribute('class');else node.removeAttribute('className');}
+if(cur_title.trim()){node.title=cur_title.trim();}else{node.removeAttribute("title");node.removeAttribute("rtekeep");}}}else{for(var i=node.firstChild;i;i=i.nextSibling){if(i.nodeType==1||i.nodeType==11)this.setLinkAttributes(i,range,cur_target,cur_class,cur_title,imageNode);}}};HTMLArea.prototype.cleanClassesAnchorImages=function(node){var nodeArray=[],splitArray1=[],splitArray2=[];for(var childNode=node.firstChild;childNode;childNode=childNode.nextSibling){if(childNode.tagName&&childNode.tagName.toLowerCase()=="img"){splitArray1=childNode.src.split("/");for(var i=this.classesAnchorSetup.length;--i>=0;){if(this.classesAnchorSetup[i]["image"]){splitArray2=this.classesAnchorSetup[i]["image"].split("/");if(splitArray1[splitArray1.length-1]==splitArray2[splitArray2.length-1]){nodeArray.push(childNode);break;}}}}}
+for(i=nodeArray.length;--i>=0;){node.removeChild(nodeArray[i]);}};HTMLArea.prototype.cleanAllLinks=function(node,range,keepLinks){if(node.tagName&&node.tagName.toLowerCase()=="a"){var intersection=false;if(HTMLArea.is_gecko){if(!HTMLArea.is_safari&&!HTMLArea.is_opera)intersection=range.intersectsNode(node);else intersection=true;}else{if(this._getSelection().type.toLowerCase()=="control"){intersection=true;}else{var nodeRange=this._doc.body.createTextRange();nodeRange.moveToElementText(node);intersection=range.inRange(nodeRange)||((range.compareEndPoints("StartToStart",nodeRange)>0)&&(range.compareEndPoints("StartToEnd",nodeRange)<0))||((range.compareEndPoints("EndToStart",nodeRange)>0)&&(range.compareEndPoints("EndToEnd",nodeRange)<0));}}
+if(intersection){this.cleanClassesAnchorImages(node);if(!keepLinks){while(node.firstChild)node.parentNode.insertBefore(node.firstChild,node);node.parentNode.removeChild(node);}}}else{for(var i=node.firstChild;i;i=i.nextSibling){if(i.nodeType==1||i.nodeType==11)this.cleanAllLinks(i,range,keepLinks);}}};HTMLArea.prototype.renderPopup_unLink=function(){this.focusEditor();var 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);if(this.classesAnchorSetup){var sel=this._getSelection();var range=this._createRange(sel);if(HTMLArea.is_gecko){this.cleanAllLinks(node,range,false);}else{this.cleanAllLinks(node,range,true);this._doc.execCommand("Unlink",false,"");}}else{this._doc.execCommand("Unlink",false,"");}
+if(Dialog._modal)Dialog._modal.close();};HTMLArea.prototype.nonStripBaseURL=function(url){return url;};TYPO3Browsers.prototype.onGenerate=function(){var editor=this.editor;editor._insertImage=editor.renderPopup_image;editor._createLink=editor.renderPopup_link;editor.stripBaseURL=editor.nonStripBaseURL;};
\ No newline at end of file
index 5d2fa9a..ee3fa81 100644 (file)
@@ -55,12 +55,12 @@ TYPO3Browsers._pluginInfo = {
 HTMLArea.prototype.renderPopup_image = function() {
        var editorNumber = this._editorNumber,
                backreturn,
-               addParams = "?" + RTEarea[0]["RTEtsConfigParams"],
+               addParams = "?" + RTEarea[editorNumber]["RTEtsConfigParams"],
                image = this.getParentElement();
                
        this._selectedImage = null;
        if (image && image.tagName.toLowerCase() == "img") {
-               addParams = "?act=image" + RTEarea[0]["RTEtsConfigParams"];
+               addParams = "?act=image" + RTEarea[editorNumber]["RTEtsConfigParams"];
                this._selectedImage = image;
        }
        
@@ -85,7 +85,7 @@ HTMLArea.prototype.renderPopup_insertImage = function(image) {
  */
 HTMLArea.prototype.renderPopup_link = function() {
        var editorNumber = this._editorNumber,
-               addUrlParams = "?" + RTEarea[0]["RTEtsConfigParams"],
+               addUrlParams = "?" + RTEarea[editorNumber]["RTEtsConfigParams"],
                backreturn,
                sel = this.getParentElement();
 
@@ -106,7 +106,7 @@ HTMLArea.prototype.renderPopup_link = function() {
                if (sel.target) addUrlParams += "&curUrl[target]=" + encodeURIComponent(sel.target);
                if (sel.className) addUrlParams += "&curUrl[class]=" + encodeURIComponent(sel.className);
                if (sel.title) addUrlParams += "&curUrl[title]=" + encodeURIComponent(sel.title);
-               addUrlParams += RTEarea[0]["RTEtsConfigParams"];
+               addUrlParams += RTEarea[editorNumber]["RTEtsConfigParams"];
        } else if (this.hasSelectedText()) {
                var text = this.getSelectedHTML();
                if (text && text != null) {
@@ -116,7 +116,7 @@ HTMLArea.prototype.renderPopup_link = function() {
                                offset = ATagContent.toUpperCase().indexOf(">");
                                ATagContent = ATagContent.substring(0,offset);
                                addUrlParams = "?curUrl[all]=" + encodeURIComponent(ATagContent);
-                               addUrlParams += RTEarea[0]["RTEtsConfigParams"];
+                               addUrlParams += RTEarea[editorNumber]["RTEtsConfigParams"];
                        }
                }
        }
index f034dfa..fb09d7e 100644 (file)
@@ -1,2 +1,2 @@
-TYPO3HtmlParser=function(editor){this.editor=editor;var cfg=editor.config;};TYPO3HtmlParser.I18N=TYPO3HtmlParser_langArray;TYPO3HtmlParser._pluginInfo={name:"TYPO3HtmlParser",version:"1.6",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};HTMLArea._wordClean=function(editor,body){var url=RTEarea[0]["pathParseHtmlModule"];var addParams=RTEarea[0]["RTEtsConfigParams"];HTMLArea._postback(url,{'editorNo':editor._editorNumber,'content':body.innerHTML},function(javascriptResponse){editor.setHTML(javascriptResponse)},addParams,RTEarea[editor._editorNumber]["typo3ContentCharset"]);return true;};
 
+TYPO3HtmlParser=function(editor){this.editor=editor;var cfg=editor.config;};TYPO3HtmlParser.I18N=TYPO3HtmlParser_langArray;TYPO3HtmlParser._pluginInfo={name:"TYPO3HtmlParser",version:"1.6",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};HTMLArea._wordClean=function(editor,body){var editorNo=editor._editorNumber;var url=RTEarea[0]["pathParseHtmlModule"];var addParams=RTEarea[editorNo]["RTEtsConfigParams"];HTMLArea._postback(url,{'editorNo':editorNo,'content':body.innerHTML},function(javascriptResponse){editor.setHTML(javascriptResponse)},addParams,RTEarea[editor._editorNumber]["typo3ContentCharset"]);return true;};
\ No newline at end of file
index 98451af..9cc4531 100644 (file)
@@ -48,9 +48,10 @@ TYPO3HtmlParser._pluginInfo = {
 };
 
 HTMLArea._wordClean = function(editor, body) {
+       var editorNo = editor._editorNumber;
        var url = RTEarea[0]["pathParseHtmlModule"];
-       var addParams = RTEarea[0]["RTEtsConfigParams"];
-       HTMLArea._postback(url, {'editorNo' : editor._editorNumber, 'content' : body.innerHTML },
+       var addParams = RTEarea[editorNo]["RTEtsConfigParams"];
+       HTMLArea._postback(url, {'editorNo' : editorNo, 'content' : body.innerHTML },
                function(javascriptResponse) { editor.setHTML(javascriptResponse) }, addParams, RTEarea[editor._editorNumber]["typo3ContentCharset"]);
        return true;
 };
index b209ad4..259843d 100644 (file)
@@ -1,2 +1,2 @@
-UserElements=function(editor){this.editor=editor;var cfg=editor.config;var self=this;var actionHandlerFunctRef=UserElements.actionHandler(this);cfg.registerButton("UserElements",UserElements_langArray["Insert custom element"],editor.imgURL("ed_user.gif","UserElements"),false,actionHandlerFunctRef);};UserElements.I18N=UserElements_langArray;UserElements._pluginInfo={name:"UserElements",version:"1.5",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};UserElements.actionHandler=function(instance){return(function(editor){instance.buttonPress(editor);});};UserElements.prototype.buttonPress=function(editor){var editorNo=editor._doc._editorNo;var backreturn;var addUrlParams="?"+RTEarea[0]["RTEtsConfigParams"];editor._popupDialog(RTEarea[0]["pathUserModule"]+addUrlParams+"&editorNo="+editorNo,null,backreturn,550,350,null,"yes");return false;};
 
+UserElements=function(editor){this.editor=editor;var cfg=editor.config;var self=this;var actionHandlerFunctRef=UserElements.actionHandler(this);cfg.registerButton("UserElements",UserElements_langArray["Insert custom element"],editor.imgURL("ed_user.gif","UserElements"),false,actionHandlerFunctRef);};UserElements.I18N=UserElements_langArray;UserElements._pluginInfo={name:"UserElements",version:"1.5",developer:"Stanislas Rolland",developer_url:"http://www.fructifor.ca/",c_owner:"Stanislas Rolland",sponsor:"Fructifor Inc.",sponsor_url:"http://www.fructifor.ca/",license:"GPL"};UserElements.actionHandler=function(instance){return(function(editor){instance.buttonPress(editor);});};UserElements.prototype.buttonPress=function(editor){var editorNo=editor._doc._editorNo;var backreturn;var addUrlParams="?"+RTEarea[editorNo]["RTEtsConfigParams"];editor._popupDialog(RTEarea[0]["pathUserModule"]+addUrlParams+"&editorNo="+editorNo,null,backreturn,550,350,null,"yes");return false;};
\ No newline at end of file
index 7db7dae..45c12c5 100644 (file)
@@ -64,7 +64,7 @@ UserElements.actionHandler = function(instance) {
 UserElements.prototype.buttonPress = function(editor) {
        var editorNo = editor._doc._editorNo;
        var backreturn;
-       var addUrlParams = "?" + RTEarea[0]["RTEtsConfigParams"];
+       var addUrlParams = "?" + RTEarea[editorNo]["RTEtsConfigParams"];
        editor._popupDialog(RTEarea[0]["pathUserModule"] + addUrlParams + "&editorNo=" + editorNo, null, backreturn, 550, 350, null, "yes");
        return false;
 };