[whatwg] [editing] Additional miscellaneous commands

Aryeh Gregor ayg at aryeh.name
Tue Aug 16 09:29:24 PDT 2011


2011/8/16 Alfonso Martínez de Lizarrondo <amla70 at gmail.com>:
> Hi
>
> The drafted specs defines most of the common features of contentEditable,
> but there are other commands that have been left out
>
> enableInlineTableEditing
> enableObjectResizing
> AutoUrlDetect
> RespectVisibilityInDesign
> ...

I have some of these noted in the "Comments" drop-down at the bottom here:

http://aryeh.name/spec/editing/editing.html#issues

I've looked at MSDN documentation and compiled a list of supported
commands, but I seem to be missing some.  Do you know of a more
comprehensive list?  Also, it would help a lot if you (or anyone else)
could point out which specific commands sound especially useful.

> IE used to had a bunch of poorly documented commands, but the important part
> for me is that those extra commands might enable some behaviors that are too
> hard to emulate by javascript, and if they can be added to the spec, then
> hopefully they will be available in the future for all the users.

I agree with this general point, but it's really best to have specific
examples to work with.  It's almost surely not worth it to
reverse-engineer all the IE commands here.  For instance,
RespectVisibilityInDesign is something we can do without -- visibility
should always be respected, so that what the user sees is what they
get when they save.  If authors want to let users edit particular
invisible things, they can make them visible using a stylesheet rule.

> One basic example is resizing. Currently Webkit browsers doesn't allow the
> user to resize a picture, table,.. that it's placed in the contents. Some
> people might not want that behavior at all, others might prefer to enable it
> only for tables but not images, and I think that instead of putting that
> burden on the javascript editor, it should be the browser the one that takes
> care of that with a basic command to turn it on/off and then firing the
> needed events when something like a resize starts or ends like IE does.

Might the CSS resize property be the best way to do this?

http://www.w3.org/TR/2004/CR-css3-ui-20040511/#resize

Then authors could do img { resize: both } or similar.  This is much
more flexible than a global on-off switch, because you could allow the
user to resize some things but not others.  For instance, a forum that
allows users to insert custom images and also smilies might want them
to be able to resize the custom images but not the smilies, and it
could do that with an appropriate CSS selector.  I'd have to update
the spec to say that if the user resizes editable things, the browser
needs to actually change the DOM to add height/width attributes or
properties.

I filed a bug on this:
<http://www.w3.org/Bugs/Public/show_bug.cgi?id=13795>.  Please feel
free to file bugs for any other specific features you'd like me to
look into.  Note that right now I'm mostly focused on fixing up and
stabilizing core functionality, so I might not get around to adding
new features for a while.


More information about the whatwg mailing list