Hi i am using an dynamic div which is editable for input text. its working fine on IE but not on firefox. I need to show html content in div. can we make div editable for firefox also?
+1
A:
Firefox requires the designMode to be set on an iFrame. The specification doesn't explicitly mention this but the following quote sort of implies it already
For example, in JavaScript, if you have an iframe with an id of 'edit', you can get its contentDocument and set designMode to "on" like this:
You will find alot of browser differences in how they handle designMode so be prepared and take it as a challenge or else you might lose a few hairs in the process.
Martijn Laarman
2009-07-24 10:38:43
can i use div with iframe can u explain with example?
pradeep
2009-07-24 10:43:29
Question has yet to unvague about there being an iframe being used. Or anything for that matter.
random
2009-07-24 10:44:20
pradeep you need to render an iframe (or substitute the div with an iframe at runtime) to enable designMode. Designmode doesn't work on any other html element in FireFox.
Martijn Laarman
2009-07-24 10:47:00
Of course you can render `<div><iframe>...` if you must have a div container around it.
Martijn Laarman
2009-07-24 10:47:33
thanks martijn, i will try to implement iframe.
pradeep
2009-07-24 10:51:47