Anne van Kesteren

contenteditable

Daniel Glazman wrote (content)editable. Here are my remarks:

The attribute has two forms. One which is completely lowercase; the contenteditable content attribute to be used on elements and such. The other is contentEditable to be used in the DOM. Probably sits somewhere on HTMLElement or so. The fact that the content attribute is lowercase is only relevant for XHTML documents.

Comments

  1. Get over it? Anne, can you please explain me how the user is supposed to handle an editable dropdown menu??? How can the user really edit the options in the menu?

    Posted by Daniel Glazman at

  2. You could offer some kind of helper dialog when the user clicks or clicks twice on the dropdown menu I suppose. I’m not really a user interface expert, but I do think you should not limit that at all.

    Posted by Anne at

  3. To limit what can be be edited, why not implement the CSS3 user-modify property? Allready mozile take advantage of it. (Don't know if mozile can make an element inside an user-modifyable element not modifyable, though. There might be an un-inheritance problem.)

    Also, I'm not sure what Danial really wants? ;-)

    Posted by Leif Halvard Silli at

  4. The problem with using CSS for semantics is that CSS is optional. Besides the fact that it is a style sheet language of course.

    Posted by Anne at

  5. "Content editable" has nothing to do with semantics. Adding it to a document does not change what the document means. Also I don't see the problem with having the option to enable or disable "content editable". So user-modify is perfect.

    Posted by Sjoerd Visscher at

  6. The attribute has two forms. One which is completely lowercase; the contenteditable content attribute to be used on elements and such. The other is contentEditable to be used in the DOM. Probably sits somewhere on HTMLElement or so. The fact that the content attribute is lowercase is only relevant for XHTML documents.

    I'm not sure I understand correctly. So you mark it up as contenteditable in XHTML documents, but the resulting DOM will contain contentEditable? Doesn't this go in against XML principles? Or did you mean that you use contentEditable when accessing the DOM using JavaScript?

    Posted by Charl van Niekerk at

  7. Sjoerd, yeah, that’s true in some way. We need something like “application semantics.” There is a difference between just reading a page and being able to modify parts of it.

    Charl, the content attribute will always be lowercase in XHTML (also in the DOM). The DOM attribute on the other hand:

    var edit = document.getElementById('foo');
    edit.contentEditable = "true";

    Posted by Anne at

  8. Read/modify: What does 'modify/edit' mean, on the interactive web? Save?

    CSS = many stylistic attributes & elements gathered in one style attribute/sheet/element. Less is more, is more order, is more semantic markup. For authors. Coders. Readers/surfers, though, needs semantic CSS: applied or default styling that «highlights» the markup.

    CSS is a simple model for deciding over elements. So why must the editability of an element be ruled by a separate attribute, if that is what you are saying? Or will we get a practical Cascading Interactivity Sheet language one day?

    Posted by Leif Halvard Silli at

  9. There's a difference between red text and blue text too.

    Posted by Sjoerd Visscher at

  10. And sometimes that difference even has meaning... In chemistry models are made with specific color conventions. Carbon is grey, hydrogen is white, oxygen is red and nitrogen is blue.

    Posted by me at

  11. I think Microsoft Word, of all things, provides a model for editing of a drop-down list, viz. in its confusing stylesheet handling. I think I’ve also seen it in FileMaker Pro. It’s advanced, but not self-contradictory as implied.

    I think it’s more urgent to communicate to Windows users that such lists are actuated with Alt-downarrow and not merely downarrow. A lot of problems of badly-designed forms auto-actuating are solved by using the right keystroke.

    Posted by Joe Clark at

  12. "Content editable" has nothing to do with semantics. Adding it to a document does not change what the document means.

    If it doesn't, it should. contenteditable should make an element a form element, with the semantics of "this is data that will be sent to the server", the same way <input value="blah"> has different semantics from just "blah".

    I haven't actually looked into what WHATWG's specced recently, though...

    Posted by dolphinling at

  13. And sometimes that difference even has meaning... In chemistry models are made with specific color conventions. Carbon is grey, hydrogen is white, oxygen is red and nitrogen is blue.

    The color does not have meaning there. It's simply a way of displaying the meaning. If you were to mark that up, you would mark up <H>, <C>, <O>, etc. and use a stylesheet to color them, not <H color="white">, and especially not <white>.

    P.S.: Anne, is your site messed up cache-wise, or is Firefox? I always have to refresh after posting a comment before I see it. (linux trunk nightly)

    Posted by dolphinling at

  14. I was just trying to make a point that color can have meaning! Anyway in chemistry they'd probably be better to use CML.

    Posted by me at