contentEditable in firefox?


I have a div section with contentEditable = true. Everything works great in IE, however in firefox i cannot edit any text in the div. What do I need to change for firefox to be happy? Below is the full page:

function FindLink()
     var dc = document.getElementById("chip1").getElementsByTagName("A");
     for (i=0;i<dc.length;i++) {
          dc[i].onclick = new Function(",,''); return false;");

<div onmouseover="FindLink()"  id = "chip1" contentEditable = false style = "left: 134px; overflow:scroll; width:188px; border-top-style:inset; border-right-style:inset; border-left-style:inset; position:absolute; top:75px; height:125px; border-bottom-style:inset">
<Font color=red>Hi Again!</font>

<a href=""></a>

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Firefox does not support contentEditable, but it supports designMode which might suit your need. Only that you'll need to use <iframe> instead of <div>.

You can check for detail.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
minnirokAuthor Commented:
Ok if I have to use iframes that's fine, but will that work in IE as well? Do you have an example you can post of this working in both browsers?

Well, in fact "designMode" is supported in IE (, so if you just want the section to be editable, this is enough:

<body onload="document.getElementById('the_iframe').contentWindow.document.designMode = 'on';">
                       <!-- to activate edit mode -->
<iframe src="about:blank" id="the_iframe" />

But if you want to script it also, browser incompatibility involves.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

minnirokAuthor Commented:
Hi Kenny,

So what's the difference exactly between designMode and contentEditable ?

All I want to be able to do is let the user type some text into the div, then if they type a URL like, have it be hilighted and they can click on it.

Can 'designMode' do that with the iFrames for both IE and FF?

Sorry for my confusion,

designMode can only be applied to a "document" (e.g. a frame / iframe), and contentEditable can almost be applied in any tags. But contentEditable is IE-only.

And if you follow ,  it should be able to support both IE & Fx.
minnirokAuthor Commented:
Hi Kenny,

I'm a little worried, I followed the link and then tried their demo:

Now, in IE a 'link' will auto hilight (like, but the same page run in firefox does absolutely nothing after you've typed a URL in the text field.... am I missing something? Is it even supposed to auto-hilight for firefox?

Yes, Firefox doesn't support auto-highlight. You'll need to program that yourself...
minnirokAuthor Commented:
Oh dear. Ok, I will have to open a new question for that then.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.