[whatwg] comments on Web Forms 2.0, 27 June 2004

Olav Junker Kjær olav at olav.dk
Fri Aug 6 00:17:12 PDT 2004

> * 2.4 Extensions to the textarea element -- it would be interesting if 
> a media type for the textarea could be specified; e.g., if it were 
> "text/html" the textarea would become a HTML editor, or a rich text 
> editor for "text/rtf".

In not sure if is a good idea to override TEXTAREA to support other
formats. First, I'm not sure it makes sense to change the content model on
a element (e.g. from pcdata to arbitrary HTML) based on an attribute
value. Second, and more important, with TEXTAREA it s hard to extend the
editing functionality with script. As Martijn pointed out
 the text beeing edited is kept in the value attribute, while the element
content is the defaultValue. If TEXTAREA is extended to (X)HTML editing,
authors would really want access to the DOM tree which is beeing edited, I
dont see how this would be possible if is kept in an attribute. 

I much prefer the approach of IE's contentEditable, where it is the actual
content of the element that is being edited. 

As for RTF and other formats, I thing this should be handled by the

Olav Junker Kjær

More information about the whatwg mailing list