The above menu shows how one can include arbitrary HTML inside menu items. If you look into the page source, you'll find out that it's pretty straight-forward: all you need to do is to embed the item inside an <A> tag, even if it has no action associated.
Everything inside an <A> tag will be copied into the menu “ad literam”, meaning, any formatting attributes will be retained, and even more complicated HTML, as shown by the last item.
The last item (Electric timeout) shows a rather complicated technique. It embeds an input field where the end-user can enter values. It makes use of the “href” attribute in order to setup the following item action: when clicked, the input field will gain focus and it's value will be applied. Please look into the source to see how easy it is.
One more note about the last field. The menu intercepts keys defined in the popup keymap (the underlined letters) and this works even if the input field is focused. Therefore, even if the end-user is editing the input field, keys that trigger menu actions will keep doing that (and probably close the menu). Currently there is no workaround for this problem, so we suggest that if you put input fields in some submenu, then you should not define any keyboard shortcuts for it.