Re: contentEditable=minimal

On 22/05/2014 08:49 , Yoshifumi Inoue wrote:
> I have questions about contentEditable=minimal

They are all very good questions. I won't claim that we have the 
answers: they are all up for discussion.

> 1. Does document.execCommand() work on contentEditable=minimal?

I would really hope it does not. I think that developers can modify the 
DOM themselves without the indirection.

There could arguably be some exceptions. No one needs 
execCommand("bold") to throw in a b/strong/font-weight:bold/whatever but 
some users don't know about keyboard shortcuts for some common 
operations such as copypasting. For those you need a way to tie a button 
to the relevant operation. It may be that for some of those 
execCommand() would be supported (but I would tend to hope we don't need 
to).

> 2. Does contentEditable=minmal support [Backspace], [Delete] keys?

Platform conventions tend to do different things with deletion, 
especially if you factor in modifiers, and these should be exposed to 
developers *as abstractions*.

It doesn't help the developer to know I hit Alt-Backspace if she doesn't 
know that on my platform it maps to delete the word left of the caret 
(for a platform-specific value of "word").

For this what the developer needs is to receive a deletion event with a 
Range that corresponds to what would get deleted.

> 3. Does contentEditable=minmal support Ctrl+C, Ctrl+X, Ctrl+V key
> combinations?

It would just use http://dev.w3.org/2006/webapi/clipops/clipops.html.

> 4. Will contentEditble=minimal spec defines deleting and pasting?
> Deleting and pasting are complex operations, especially selection range
> cross over elements, or on table.

Yes, these things can be complex, but where they can be handled by 
developers without requiring special knowledge of the platform then they 
should be. If, after this works, we see that there are common operations 
that get reimplemented a lot then we can add them to the platform as well.

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Thursday, 22 May 2014 14:06:23 UTC