Hi guys.... I'm new to the FCKeditor, so pardon me if you find this problem as frivolous..... ... I've made this plugin for the insertion of the marquee tag ... It works perfectly fine with the 2.4.3 version, but it's throwing an error in 2.5.... when I try and debug it with Firebug, it takes me to a line in the fckeditorcode_gecko.js file, which does nothing but confuses me more
.... I've done some fault finding and come to a conclusion that it fails when the oEditor.FCK.InsertElement(); function is called...... There are a few more things that I'd like to mention....
1> I've made other plugins which use this same function, but they don't seem to have a problem in 2.5.....
2> In 2.4.3 the <marquee> tag gets inserted without any <p>;nbsp</p> before and after it... whereas in 2.5 the tag gets inserted like this
<p> </p> <marquee scrollamount="5" scrolldelay="5" direction="right" width="200" height="10" align="middle"><span id="1198046895086S" style="display: none"> </span>testing</marquee> <p> </p>
As you can see... there is an extra <span> tag being generated....
Please have a look at the code and see if you can pin point the source of the problem(I'm just posting the "OK" function that gets called on pressing the OK button of the plugin popup)...
/* This is the function that performs the task of inserting the marquee tag inside the fckeditor panel. It returns a boolean true to signal a successfull completion. */ function Ok(){ var sMarqueeText = document.getElementById('marquee.text').value; var sMarqueeDirection; if(document.getElementById('direction.left').checked) sMarqueeDirection = document.getElementById('direction.left').value; else if(document.getElementById('direction.right').checked) sMarqueeDirection = document.getElementById('direction.right').value; else if(document.getElementById('direction.down').checked) sMarqueeDirection = document.getElementById('direction.down').value; else if(document.getElementById('direction.up').checked) sMarqueeDirection = document.getElementById('direction.up').value; var sMarqueeDelay = document.getElementById('marquee.delay').value; var sMarqueeAmount = document.getElementById('marquee.amount').value; var sMarqueeBehaviour; if(document.getElementById('marquee.scroll').checked) sMarqueeBehaviour = document.getElementById('marquee.scroll').value; else if(document.getElementById('marquee.slide').checked) sMarqueeBehaviour = document.getElementById('marquee.slide').value; else if(document.getElementById('marquee.alternate').checked) sMarqueeBehaviour = document.getElementById('marquee.alternate').value; var sWidth = "100%"; if(document.getElementById('specify.width').checked){ if(document.getElementById('marquee.width').value==''){ alert('Please specify the width'); return(false); } sWidth = document.getElementById('marquee.width').value; if(document.getElementById('marquee.width.percent').checked){ sWidth = sWidth + "%"; } } else if(oMarquee){ sWidth = document.getElementById('marquee.width').value; if(document.getElementById('marquee.width.percent').checked){ sWidth = sWidth + "%"; } } var sHeight; //default height is null if(document.getElementById('specify.height').checked){ if(document.getElementById('marquee.height').value==''){ alert('Please specify the height'); return(false); } sHeight = document.getElementById('marquee.height').value; if(document.getElementById('marquee.height.percent').checked){ sHeight = sHeight + "%"; } } else if(oMarquee){ sHeight = document.getElementById('marquee.height').value; if(document.getElementById('marquee.height.percent').checked){ sHeight = sHeight + "%"; } } var sLoop = "-1"; if(!document.getElementById('marquee.continously').checked){ if(document.getElementById('marquee.iteration').value!='') sLoop = document.getElementById('marquee.iteration').value; else{ alert("Please enter the number of iterations"); document.getElementById('marquee.iteration').focus(); return(false); } } var sBackgroundColor = null; if(document.getElementById('backgroundcolor').selectedIndex!=0){ sBackgroundColor = document.getElementById('backgroundcolor').options[document.getElementById('backgroundcolor').selectedIndex].style.color; } // Starting with the setting of the attributes of the marquee tag.... var bExists = (oMarquee!=null); if (!bExists) oMarquee = oDom.createElement('MARQUEE'); oMarquee.innerHTML = sMarqueeText; SetAttribute(oMarquee,'direction',sMarqueeDirection); SetAttribute(oMarquee,'scrolldelay',sMarqueeDelay); SetAttribute(oMarquee,'scrollamount',sMarqueeAmount); SetAttribute(oMarquee,'behavior',sMarqueeBehaviour); SetAttribute(oMarquee,'width',sWidth); SetAttribute(oMarquee,'height',sHeight); SetAttribute(oMarquee,'loop',sLoop); SetAttribute(oMarquee,'bgcolor',sBackgroundColor); //Saves the state so that an undo can revert back to it. oEditor.FCKUndo.SaveUndoStep(); //Actually commits the tag to the FCKpanel. oEditor.FCK.InsertElement(oMarquee); oEditor.FCK.Commands.GetCommand('Source').Execute(); oEditor.FCK.Commands.GetCommand('Source').Execute(); return(true); // Necessary if you want the plugin dailog to close after the user presses OK }
The Marquee plugin present at this link also fails in 2.5!!!

https://sourceforge.net/tracker/index.php?func=detail&aid=1618951&group_id=75348&atid=737639