[whatwg] What exactly is contentEditable for?

On 24 Aug 2005 at 0:17, Ian Hickson wrote:

> > Could we extend contentEditable in a way that would let the UA offer a 
> > non-scripting UI for "saving" the edited page? For example using the 
> > "form" attribute from WF2?
> 
> What's wrong with File > Save ?

I meant "Save" as in "submit to the server" (thought the sample code 
would make that clear). File > Save puts a copy of the file on your 
hard disk (if you have one) and should continue to do so. Repeating 
example: using

<form id="saveform" action="" method="put"></form>

<div contentEditable="true" form="saveform"></div>

lets the UA know that it can offer a "save edits" UI to the user that 
submits the edited contents as a PUT request to the current URL.
Most contentEditable uses would still use scripting of course, since 
IE doesn't support the form attribute on editable elements, but with 
this we have a noscript option.

(This syntax isn't good enough for POST requests because there is no 
simple way to name the submitted data. The proposed <textarea 
src="#editableDiv"> is better on this point.)
-- 
Hallvord Reiar Michaelsen Steen
http://www.hallvord.com/

Received on Wednesday, 24 August 2005 00:41:06 UTC