Great editor... love it.. wanna donate to the project but there is 2 major bugs stopping me from doing this:
Firefox:
1. When the editor is not the very first item in the form, the iframe seems to be disabled and I need to click on "source" twice to enable it.
2. If you do not click "source" twice as above, click on the "format" drop-down, then click anywhere else to cancel it, you will throw the following exception:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: <URL_REMOVED>/fck/editor/js/fckeditorcode_gecko.js :: anonymous :: line 37" data: no]
We were able to fix bug 2 by checking to see if any text was selected first....
function Document_OnContextMenu(e){
if (!e.target._FCKShowContextMenu)
e.preventDefault();
};
document.oncontextmenu=Document_OnContextMenu;
FCK.RedirectNamedCommands=new Object();
FCK.ExecuteNamedCommand=function(A,B,C){FCKUndo.SaveUndoStep();
if (!C&&FCK.RedirectNamedCommands[A]!=null && FCK.RedirectNamedCommands[A]!=null) {
FCK.ExecuteRedirectedNamedCommand(A,B);
} else {FCK.Focus();
try{
FCK.EditorDocument.execCommand(A,false,B);
FCK.Events.FireEvent('OnSelectionChange');
} catch(e) {
// no text select, duh!
}
};
FCKUndo.SaveUndoStep();
};
Internet Explorer:
IE has the same bug as number 2 above, but it will completely crash any version I try it on. We are currently going through the code trying to see if it is the same issue.
Firefox:
1. When the editor is not the very first item in the form, the iframe seems to be disabled and I need to click on "source" twice to enable it.
2. If you do not click "source" twice as above, click on the "format" drop-down, then click anywhere else to cancel it, you will throw the following exception:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: <URL_REMOVED>/fck/editor/js/fckeditorcode_gecko.js :: anonymous :: line 37" data: no]
We were able to fix bug 2 by checking to see if any text was selected first....
function Document_OnContextMenu(e){
if (!e.target._FCKShowContextMenu)
e.preventDefault();
};
document.oncontextmenu=Document_OnContextMenu;
FCK.RedirectNamedCommands=new Object();
FCK.ExecuteNamedCommand=function(A,B,C){FCKUndo.SaveUndoStep();
if (!C&&FCK.RedirectNamedCommands[A]!=null && FCK.RedirectNamedCommands[A]!=null) {
FCK.ExecuteRedirectedNamedCommand(A,B);
} else {FCK.Focus();
try{
FCK.EditorDocument.execCommand(A,false,B);
FCK.Events.FireEvent('OnSelectionChange');
} catch(e) {
// no text select, duh!
}
};
FCKUndo.SaveUndoStep();
};
Internet Explorer:
IE has the same bug as number 2 above, but it will completely crash any version I try it on. We are currently going through the code trying to see if it is the same issue.