Hi,
i'm in the process of integrating FCKeditor in my CMS which is written in PHP. I use v2.1.1 and everything works fine in Firefox. But IE just displays an JS-error saying
"'length' is NULL or no object" in fckeditor.html (line-number 47, char 1327).
Using the demo with IE is working fine. What am i missing?
I'm using following PHP-code:
-------------------------------------------------------
include("_editor/FCKeditor/fckeditor.php") ;
$sBasePath = '/_lib/_editor/FCKeditor/';
$oFCKeditor = new FCKeditor('EDITOR');
$oFCKeditor->BasePath = $sBasePath;
$oFCKeditor->Config['CustomConfigurationsPath'] = $sBasePath.'projectCMS.js' ;
$oFCKeditor->Value = ($_POST["HTML"]) ? $_POST["HTML"] : $c["html"];
$oFCKeditor->Width = '595' ;
$oFCKeditor->Height = '320' ;
$oFCKeditor->ToolbarSet = 'projectCMS_default';
$oFCKeditor->Config['EditorAreaCSS'] = '/templates/_css/mainstyles.css' ;
$oFCKeditor->Config['TemplatesXmlPath'] = $sBasePath.'projectCMS_templates.xml' ;
$editor = $oFCKeditor->CreateHtml();
-------------------------------------------------------
I take it that a custom config-file overwrites settings made in fckeditor.js, correct?
The config-file "projectCMS.js" contains:
-------------------------------------------------------
FCKConfig.ToolbarSets["projectCMS_default"] = [
['Undo','Redo','-','Bold','Italic','-','Templates','-','OrderedList','UnorderedList','-','Link','Unlink'],
['FontFormat'],
['Source','Preview'],
] ;
FCKConfig.ToolbarSets["projectCMS_forms"] = [
['Undo','Redo','-','Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink'],
['FontFormat'],
['Checkbox','Radio','TextField','Textarea','Select','HiddenField'],
['Source'],
] ;
FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6' ;
-------------------------------------------------------
Now, i know that the line-number and char-numbers given in a IE-JS-error message are no good at all. I take it that the error seems to occur somewhere in "fck_startup.js", "fckeditorcode_ie_1.js" or "fckeditorcode_ie_2.js". As these files are not really readable i would like to know where to look in the source files. Maybe i can find the error then. Or am i missing something else here?
Many thanks for any help!
Plauderer
i'm in the process of integrating FCKeditor in my CMS which is written in PHP. I use v2.1.1 and everything works fine in Firefox. But IE just displays an JS-error saying
"'length' is NULL or no object" in fckeditor.html (line-number 47, char 1327).
Using the demo with IE is working fine. What am i missing?
I'm using following PHP-code:
-------------------------------------------------------
include("_editor/FCKeditor/fckeditor.php") ;
$sBasePath = '/_lib/_editor/FCKeditor/';
$oFCKeditor = new FCKeditor('EDITOR');
$oFCKeditor->BasePath = $sBasePath;
$oFCKeditor->Config['CustomConfigurationsPath'] = $sBasePath.'projectCMS.js' ;
$oFCKeditor->Value = ($_POST["HTML"]) ? $_POST["HTML"] : $c["html"];
$oFCKeditor->Width = '595' ;
$oFCKeditor->Height = '320' ;
$oFCKeditor->ToolbarSet = 'projectCMS_default';
$oFCKeditor->Config['EditorAreaCSS'] = '/templates/_css/mainstyles.css' ;
$oFCKeditor->Config['TemplatesXmlPath'] = $sBasePath.'projectCMS_templates.xml' ;
$editor = $oFCKeditor->CreateHtml();
-------------------------------------------------------
I take it that a custom config-file overwrites settings made in fckeditor.js, correct?
The config-file "projectCMS.js" contains:
-------------------------------------------------------
FCKConfig.ToolbarSets["projectCMS_default"] = [
['Undo','Redo','-','Bold','Italic','-','Templates','-','OrderedList','UnorderedList','-','Link','Unlink'],
['FontFormat'],
['Source','Preview'],
] ;
FCKConfig.ToolbarSets["projectCMS_forms"] = [
['Undo','Redo','-','Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink'],
['FontFormat'],
['Checkbox','Radio','TextField','Textarea','Select','HiddenField'],
['Source'],
] ;
FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6' ;
-------------------------------------------------------
Now, i know that the line-number and char-numbers given in a IE-JS-error message are no good at all. I take it that the error seems to occur somewhere in "fck_startup.js", "fckeditorcode_ie_1.js" or "fckeditorcode_ie_2.js". As these files are not really readable i would like to know where to look in the source files. Maybe i can find the error then. Or am i missing something else here?
Many thanks for any help!
Plauderer
RE: Troubles integrating FCKeditor with IE
I managed to find the error on my own!

In the custom config file at the toolbar declaration there was a colon too many after the last group! That was all.
Thanks anyhow!
RE: Troubles integrating FCKeditor with IE
Funny how it worked fix in firefox but not in IE