contenteditable
Daniel Glazman wrote (content)editable. Here are my remarks:
contentEditable
DOM attribute in Internet Explorer takes a string and not a boolean and the same is true for the content attribute which means it can easily be extended;
contenteditable
needs to become more rich and at the same time limiting the editing of form controls seems a bit weird. Get over it!
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.
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?
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.
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? ;-)
The problem with using CSS for semantics is that CSS is optional. Besides the fact that it is a style sheet language of course.
"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.
The attribute has two forms. One which is completely lowercase; the
contenteditable
content attribute to be used on elements and such. The other iscontentEditable
to be used in the DOM. Probably sits somewhere onHTMLElement
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?
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";
…
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?
There's a difference between red text and blue text too.
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.
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.
"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...
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)
I was just trying to make a point that color can have meaning! Anyway in chemistry they'd probably be better to use CML.