Ticket #2857 (closed Bug: worksforme)
EditorAreaCSS IE8
| Reported by: | exanice | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Core : Styles | Version: | FCKeditor 2.6.4 |
| Keywords: | IE8 Pending WorksForMe | Cc: |
Description
I've tested the FCK Editor 2.6.4 (Build 21629) with Internet Explorer 8 Release Candidate (v. 8.0.6001.18372IC). And most of the Features work fine!
But there seems to be a problem when linking custom css styles with long file paths to the FCK Editor. I tried several different options to EditorAreaCSS, and this is what I found out:
Test value: FCKConfig.EditorAreaCSS = "/App_Themes/Blue/css/content.css";
Result: js Error on Line: 38 (fckeditorcode_ie.js)
Error: Invalid argument.
Function: var s=A.createStyleSheet("");
Test value: FCKConfig.EditorAreaCSS = "/content.css, /App_Themes/Blue/css/content.css";
Result: js Error Line: 38 (fckeditorcode_ie.js)
Error: Not enough storage is available to complete this operation.
Function: return A.createStyleSheet(B).owningElement;
The Files were available and on the right place! In all other browser everything works fine.
Any Solutions?
GreetX
Change History
comment:2 Changed 4 years ago by alfonsoml
- Keywords Pending WorksForMe added; EditorAreaCSS removed
I've tested but it isn't failing for me.
Do you have any other info that could help to reproduce the problem?
comment:3 Changed 4 years ago by exanice
i already found a solution last week!
i made a mistake on the definition in fckconfig.js file:
FCKConfig.EditorAreaCSS = "/content.css, /App_Themes/Blue/css/content.css";
Should be like this:
FCKConfig.EditorAreaCSS = new Array
("/content.css", "/App_Themes/Blue/css/content.css");
But then occured another problem, i use the .net fck editor implementation to set EditorAreaCSS, and there is the only option to set a string for the EditorAreaCSS (should be an array). it passes the string to a hidden field, and then it gets read from the fckeditor. the fckeditor expects an array when given multiple paths to css files, in IE8 this produces the error which i descriped above.
i fixed it by inserting the follwing line of code to the FCKConfig_PreProcess() Function:
if (A.EditorAreaCSS.indexOf(",")>-1) A.EditorAreaCSS=A.EditorAreaCSS.split(',');
if more than one value is passed, it gets seperated to an array, and everything works fine
i would be pleaset if you can add this fix to the original source code!
greetx
comment:4 Changed 4 years ago by exanice
i changed the code a bit, because when only one css path with a on long value is passed, it occurs an error too.
the fix now look as follow:
if (A.EditorAreaCSS!=") A.EditorAreaCSS=A.EditorAreaCSS.split(',');
and in the original file:
if (oConfig.EditorAreaCSS!=") oConfig.EditorAreaCSS=oConfig.EditorAreaCSS.split(',');
so it is always an array, and it works...
comment:5 Changed 4 years ago by alfonsoml
The conversion from string to an array is done in the FCKTools.AppendStyleSheet and I've said, I tried to use a value consisting of several paths separated by a comma and it did work at first try without any change to the code.
