Reputation: 25285
Wondering if there's any not-too-hard way to edit non-form text in html 4. I know there's a contentEditable property that can be set in html 5, but I want better browser support than that will give me. It seems like gmail is doing something like this in their chat status indicator. This works properly on IE6 (which I don't believe supports html 5). Has anyone seen this done? thanks, -Morgan
Upvotes: 0
Views: 1309
Reputation: 4506
Have you considered using CSS to make a <textarea>
look like something else? Just because something is a form control, doesn't mean it has to look like once. You can change the background, shadows, borders etc.
Upvotes: 1
Reputation: 536765
HTML5's contentEditable is modelled after the existing property from IE, which is also supported by (at least) Firefox and Safari, so you don't have to wait for HTML5 to be ‘supported’.
It's an incredibly ugly piece of design, but it works.
Upvotes: 1
Reputation: 1208
You can set the innerText or innerHTML property in javascript for most dom elements including divs and tables.
Upvotes: 0