[whatwg] What exactly is contentEditable for?

Hallvord Reiar Michaelsen Steen hallvord at hallvord.com
Tue Aug 30 01:21:32 PDT 2005


On 29 Aug 2005 at 17:25, Jim Ley wrote:

> > Why must contentEditable depend on scripting? What if we make sure
> > the wording of the spec allows non-scripting implementations? 
> 
> Please, no, a lot the use cases for contentEditable are not full
> wysiwyg editing, a lot of the ones I create allow only a minimal
> subset of editing, and they do this by scripting, if you can only
> strong/make link/italic/colour/insert image, then you get a simple
> editor that allows for easy editing, but doesn't run into much
> tag-soup that needs elaborate cleaning up.

If the UA makes tag soup rather than valid code, that is a bug in the 
UA and should be reported in the appropriate bug system. 

If security and content filtering is a concern - well, you have to 
filter anyway, remember to never trust user input. Also, it would be 
trivial to specify what functionality a UA should support in non-
scripting mode, and what should only be activated through scriptable 
interfaces.
 
> Whilst I agree the concept of contentEditable is not good, I don't
> think it should be solved by trying to modify the existing behaviour
> the accept="text/html" is a much better way of meeting your use case.

If it gets implemented in a WYSIWYG form...
We have already discussed back and forth on whether using a TEXTAREA 
is better, and I think we all agree that neither approach is really 
good. Saying that contentEditable elements can become part of a form 
will give us the best parts from each of the worlds IMO.

-- 
Hallvord Reiar Michaelsen Steen
http://www.hallvord.com/





More information about the whatwg mailing list