W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2006

[whatwg] contentEditable and the user editing break action

From: Jorgen Horstink <mail@jorgenhorstink.nl>
Date: Tue, 09 May 2006 09:06:02 +0200
Message-ID: <44603F5A.3050906@jorgenhorstink.nl>
?The contenteditable attribute is a common attribute. User agents must 
support this attribute on all HTML elements.?

How about del? It sounds odd to me to allow content of a del element to 
be editable.

Second, I am interested why User Editing actions are mostly 
UA-dependent. To my mind there should be one standard for editing. It is 
very frustrating if applications behave differently in different browsers.

I'd suggest at least to rephrase the 'break block' and 'insert a line 
seperator' sections. Whenever a user requests a break (block break or 
inline break) the behaviour should depend on the state the editing is 
in. It is stupid to insert two inline breaks (is it really? I guess so). 
I.E.

<p>
foo
<br>
<br>
foo
</p>

Above example does not make sense. Because of this fact, inserting 
'block breaks' and 'inline breaks' can be invoked with one and the same 
action (pressing the enter key, talking to the browser whatever).

If the last action was not a break request, an 'inline break' will be 
inserted. If the last action was a break request, a block break will be 
inserted.

The pipe represents the carret in the examples below:

<p>
foo|
</p>

After requesting a break, an inline break will be inserted:

<p>
foo<br>|
</p>

After requesting another break, an block break will be inserted. Note 
the last BR will be removed.

<p>
foo
</p>
<p>
|
</p>

I hope the idea of this algorithm is clear. I was wondering whether it 
has potential to be added to the spec (there are quite a lot edge cases 
though).

-jorgen

<http://jorgenhorstink.nl>
Received on Tuesday, 9 May 2006 00:06:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:27 UTC