[whatwg] Ongoing work on an editing commands (execCommand()) specification

Aryeh Gregor Simetrical+w3c at gmail.com
Mon Mar 14 10:28:43 PDT 2011


On Sun, Mar 13, 2011 at 5:20 PM, Markus Ernst <derernst at gmx.ch> wrote:
> IMO, from the moment you decide to use <b> and not style="bold" (be it due
> to a user selectable mode or not), style="bold" should actually be totally
> avoided. . . .
>
> I think that the code generated should be homogeneous, independent from the
> original markup (which may be copy-/pasted from various sources). That
> means, the bolding in your example would be changed to <b> already when the
> contenteditable element is built, or when the fragment is pasted in.

I don't think it's a good idea to reformat all the existing markup
until the user makes a change.  We should try to modify not too much
more than we actually need to to achieve the desired changes.  At the
same time, I definitely think we should simplify the markup in the
places we do change it, so that continual execCommand() usage doesn't
build up endless cruft.  In this case I'd be inclined to agree that
converting to <b> makes more sense, once you're already pushing the
markup down, but it's not a big deal.


More information about the whatwg mailing list