View Full Version : DesignMode vs Contenteditable on DIV

03-10-2005, 12:05 PM

I created a (basic) WYSIWYG editor in javascript. Problem is that I used a DIV and contenteditable true.

So It won't work in other browsers except IE.

I readed that I need to set DesignMode to on to get the same result. Problem is all I find about designmode is on iframes not on divs. If I try it on a div it will fail.

How can I make a div editable for other browsers?

Tanks in advance

03-10-2005, 03:43 PM
generate the interface using JS. use object detection to determine which method is supported, then create the corresponding element accordingly:

if designMode ... insert iframe
else .... insert div