tags:

views:

275

answers:

1

Hello everyone

I found problem with NicEdit (Rich text editor) when typing some text and click align button to align text. The text doesn't align only on FireFox and got this message on FireBug

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://js.nicedit.com/nicEdit-latest.js :: anonymous :: line 38" data: no] Line 0

Please could you help me to solve this problem.

Thanks,

+2  A: 

If you are using the compressed code, go to line 37 and find this code:

Search for B.contentEditable

You will find an if condition exactly like this:

if (B.contentEditable || !!window.opera)


Replace it with this:

if ((B.contentEditable || !!window.opera) && navigator.userAgent.indexOf("Firefox/3") == -1)

Maher El-Atawy
Thank you very very much Maher El-Atawy, this is what I waiting for a long time. In my point, NicEdii suits my need but the problem make me disappointed. Your help is my good news in this morning.May God bless you. :)
embarus
I had the exact same issue and hadn't a clue on how to address it. Your fix did the trick :)
Zurahn
@Maher, I did what you said and it throws a new error: var B=$BK(this.elmFrame.contentWindow.document); Any ideas?
Emile