W3C home > Mailing lists > Public > www-html@w3.org > January 2002

Re: in defense of contentEditable - demo

From: Andrew Clover <and@doxdesk.com>
Date: Thu, 10 Jan 2002 14:17:30 +0000
To: www-html@w3.org
Message-ID: <20020110141730.A20190@doxdesk.com>
Robert Koberg <rob@koberg.com> wrote:

> I am trying to get the w3c-html wg to look at adding
> contentEditable to the standard

I'm quite aware of how it works! The contentEditable attribute is:

  - simple,
  - convenient,
  - useful,
  - completely unsuited to being part of a standard HTML.

As others have pointed out, editing is useless unless the result of the
editing can be submitted to a server. This simply cannot be done for
arbitrary elements in HTML: only forms can be submitted. The only way
to submit the content from a non-form-field contentEditable element is
to use client-side scripting to extract it first.

A contentEditable attribute is useless without scripting. Making it
necessary for all browsers to include client-side-scripting, an
HTML-editing component and serialiser just to implement simple HTML forms
is highly undesirable. It is also completely backwards incompatible.

If I were to suggest a way to allow HTML content to be edited and submitted
to a form handler, I'd definitely want to do it by extending existing form
elements. One obvious syntax that comes to mind would be:

  <textarea name="foo" type="text/html" cols="bar" rows="baz">
    blah &lt;em> blah &lt;/em> blah

'type' defaulting to "text/plain" of course. Older browsers and browsers
that do not contain an HTML-editing component can happily let the user
edit the HTML source, and everyone's happy.

I don't know what approach the XForms team will be taking, though.

Andrew Clover
Received on Thursday, 10 January 2002 09:22:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:58 UTC