views:

88

answers:

3

I am trying to implement Rich text editor like http://tinymce.moxiecode.com/ for my XUL application. It looks like i can't user tinymce as some of its scripts is using the element "document.body" and firefox is not supporting it. Did any implement a rich text editor in XUL. Please let me know.

A: 

It's not that firefox doesn't support document.body. document is different depending on what kind of document you have. In HTML you have document.body because an HTML document will always have a <BODY> element. XUL doesn't have a <BODY> so it's natural that the document doesn't have a document.body property.

The problem is that TinyMCE is heavily depending on that the document is HTML. I don't know the code for TinyMCE but I would suspect that it can be modified to support XUL as well.

lithorus
A: 

An HTML <frame> with TinyMCE is the easiest way to go about it. The harder but possibly better way would be to include a <body xmlns="http://www.w3.org/1999/xhtml"/&gt; tag in the document and assign document.body to that element.

Eli Grey
Grey, I will try this and keep you posted. Thank you
vamsivanka
A: 

Use <html:iframe src="URL to your editor"> is the easiest way to do it

hvtuananh