document.designMode for elements

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

document.designMode for elements

Post by JellyFish »

Is there a way I can get only one element to be in designMode instead of the whole document?

Like:

Code: Select all

document.getElementById("foo").designMode = "on";
I can't think of any other way of doing this. Is it possible?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Under IE you can use contentEditable under other browsers, I believe you are SOL. :P
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

How could I get a regular block element to be editable, text wise; like a input or textarea element? No, better yet, how do I make an input automatically expand when filled with text, pixel perfect?
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

Iframe/Frame.
Post Reply