(content)editable
By glazou on Monday 29 May 2006, 10:55 - Standards - Permalink
In august 1999 in Cleveland, in a train between downtown and the airport, I had quite a long chat with Tantek Çelik about the contenteditable attribute introduced by Microsoft. In substance, I told him that I was very impressed by that innovation and that I loved it. I remember telling him precisely "I have the feeling this is the way to go, I am impressed".
I am very happy to see the amazing Ian Hickson and his amazing crowd of WHAT gurus have it part of Web Applications 1.0. But with all due respect to the incredible work done by Ian and peers, that's not enough... This is a 1998 solution into a 2006 document.
I think the thingy called Web 2.0 needs a new editable attribute superseding the contenteditable one, and taking more complex values than only true or false. We need a way to say that only text can be entered/changed/deleted/.... That the user can create inline elements (strong, em, ...). Or that the user is allowed to insert a line break. Or create a new block/split the current block in two. And, and, and.
I'd like such an attribute to be a whitespace-separated list of values and I would also like to be able to specify what elements the user is allowed to create. That would allow for instance the user to handle a list without having the right to end or split the list.
I also think that editing form controls is a so complex thing that it should not be allowed. Form controls in (content)editable areas should be only removable, not editable.

Comments
Depending on the design of the page, we also need a way to set (or not) the same "undo transaction history" for multiple contenteditable blocks in the page (www.whatwg.org/specs/web-...
Imagine an attribute undoManagerKey : editable blocks with the same undoManagerKey value use the same "undo history".
In some cases, this attribute could also be usefull for stanrdard form fields.
(sorry fo my poor english)
Internet Explorer has a nice(I think) solution for editing form controls.
The first click on the form control lets you resize/cut/copy/delete the form control. When clicking a second time on the form control, it lets you edit its contents.
I agree with Martijn, IE's form editing is pretty sweet. I also find that in Gecko, form controls in a table don't work well while in midas mode, but that isn't spec related:)
Talking about historical references, I have a little anecdote to share with you. In Daniel's annual peer review at Netscape, several years ago, under the 6th paragraph called "INNOVATES - Improves results by generating, encouraging, and supporting new ideas", I wrote:
---
OUTSTANDING: Daniel is probably one of the persons within the company who
stays the most up-to-date with the latest developments in the industry and
the different standard committees. He drives the evolution of the CSS
specification and, inside the company, pushes for innovations such as his
3-steps plan for the Editor. But the thing that maybe impressed me the most
is how he learnt about 'contentEditable' and immediately saw the interest of
this widely unknown feature that Microsoft is working on, that could with
little work open the door to many applications for sharing documents over the web.
---
Voilà. I think it shows how much Daniel loves 'contentEditable' and how much thought he already put in it. May that passion not be in vain, and may that feature finally see the light!
Pierre : hey ! AOL is going to sue you for disclosure of HR-related docs !-)