[whatwg] What exactly is contentEditable for?

On 8/30/05, Hallvord Reiar Michaelsen Steen <hallvord at hallvord.com> wrote:
> On 29 Aug 2005 at 17:25, Jim Ley wrote:
> > 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.

WYSIWYG editing has to produce "tag-soup", it's free of semantics, as
the wysiwyg cannot know the semantics intended by the user, for that
reason the only way is to limit the elements to those with only strong
semantics - links, images etc. - Colour something red, use a list -
how does the UA know the semantics are correct?

> If security and content filtering is a concern - well, you have to
> filter anyway, remember to never trust user input. 

It's nothing to do with security, it's to do with the semantic
viability of the resulting mark-up, and yes of course it gets
validated, but rejecting it and returning the user to the same flawed
interface is not going to help them solve their problem.

>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.

If you feel it's trivial, that's fine, I don't particularly see it as trivial.

> Saying that contentEditable elements can become part of a form
> will give us the best parts from each of the worlds IMO.

No, it gives us unpredictability, and unpredictability on thousands of
existing pages, giving a rubber stamp to contentEditable as existing
now makes sense.

Jim.

Received on Tuesday, 30 August 2005 02:20:50 UTC