I have a problem integrating version 2.0 in a CMS. My textarea is defined as:
<textarea id="content01" name="content"> </textarea>
FCK is supposed to replace this textarea by using:
var fck1 = new FCKeditor('content01');
fck1.ReplaceTextarea();
This worked fine upto version 2.0FC but breaks in 2.0 Final. The following error is generated in the javascript console:
Error: FCK.LinkedField has no properties
Source File: http://localhost/fck/editor/js/fckeditorcode_gecko_1.js
Line: 14
It looks like FCK is now using the name attribute instead of the id attribute to identify a textarea because 2.0 works when changing the name attribute to "content01". This however breaks the CMS.
This problem does not occur in Internet Explorer.
Sun, 08/21/2005 - 03:00
#1
RE: Version 2.0 breaks Firefox
RE: Version 2.0 breaks Firefox
RE: Version 2.0 breaks Firefox
I have found and fixed the bug in ASP.Net version.
Please see description here:
http://communityserver.org/forums/4/492 ... spx#492469
Cheers,
mandelbug
RE: Version 2.0 breaks Firefox
Replacetextarea worked in Firefox if both the ID & Name
are the same (or u remove the ID):
<textarea id="FCKeditor1" name="fckeditor1">
However, Firefox doesn't work if the ID & Name are
different:
<textarea id="FCKeditor1" name="fckeditor1X">
that's a big problem, if u have to use a different name tag!
RE: Version 2.0 breaks Firefox
now it works also with DNN.
RE: Version 2.0 breaks Firefox
protected override void Render(HtmlTextWriter writer)
{
// ...
sLink += "editor/fckeditor.html?InstanceName=" + this.ClientID ;
}
ClientID needs to be changed to UniqueID, in the below lines when textarea is created, it uses UniqueID property.
fck_startup.js uses document.getElementsByName(FCK.Name) method, as the names do not match LinkedField returns null.
The corrected line is as follows:
sLink += "editor/fckeditor.html?InstanceName=" + this.UniqueID ;
Does this solves the issue?
RE: Version 2.0 breaks Firefox
Is it a simple correction I can make in the JavaScript code, or is it something I need to download from somewhere?
Thanks.