= "&" code ";" [amp]
comment = "<" "!" "--" (-("!" "--" ">") .)* ("!" "--" ">")? [comment] -> ""
comment = "<" "!" (-">" .)+ ">" [comment] -> ""
The HTML <label> tag makes the browser work more smoothly. It is an invisible friend to checkboxes and radio buttons.
Without it, text is just text; but when the text is enclosed along with its control in a <label>, the browser directs clicks in the whole label into the control.
Without labels:Let's show the HTML inside this label, and allow that HTML to be edited! A change to the HTML immediately changes the target, and the HTML is reciprocally kept updated when you're not typing in it. Text and <tags> are allowed, no <tag attributes>. The label has been made 'contenteditable', the mouse cursor is for text, and the buttons set styles...
Text controls: |
...
|
Target label: |
This label starts with some bold text. Can you textedit it? If you can, it shows you its html.
|
Easy-edit HTML: |
|
Annoying HTML: |
|
<HTML>Bla Bla Bla!</HTML>
So where's the trick? Well, let's define an 'editing mode' for it. Use this to turn editing mode on and off:
[
Wow. OK, still ipad problems, although better. One is that autofocusing on the caption shows the keyboard without properly rescrolling to show it. (Clicking into the contenteditable works right). This seems fixable with scrollIntoView() thank goodness. Another is that when any text editing is happening, ipad changes where fixed-position elements are put! Normally they're relative to the view; text editing makes them relative to the page. This makes it impossible to use the message box.