How to make <DIV> Editable in FireFox
Ok , I am not sure that it is a proper forum to ask the question but I dont see any other Forum for Javascript and FireFox comatibality related questions.
I am working ASP .NET using VWD Express.
I included <Div> Tag as an editable Text Area. I did some JavaScript as a client side scripting. This all works fine in IE but when I open the page in FireFox I cant enter any thing in the <DIV>Tag.
I am not sure how can I make this <Div> tage editable by FireFox also?
Regards,
Omer Kamal
Apparently this is a highly argued-over issue: http://simon.incutio.com/archive/2002/10/17/contentEditableInMozilla
I came across this problem before, which is the fact that the
contenteditable property of the div element is not one which is
supported across all browsers: it's a Microsoft standard. Instead of
editable divs, some other alternatives I've found useful have been 1)
overlaying a same-sized text area on top of the div, then writing its contents back to the div using the DOM methods when the time is right, or 2) not using editable divs: why not just style text areas to look similar to the div you would like to be editable?
Overlaying a same-sized text area on top of div opens a can of worms of its own, as microsoft and non-microsoft IE support different properties specifying the real-life widths and heights of elements. I suggest checking out the mozilla developer center beta page, which, when describing properties of elements, usually specifies which browsers do and don't support the properties.
A link to this page is http://developer.mozilla.org/