I\'ve defined the following two span elements: 1) element inside a contenteditable div. 2) contenteditable element.
So far, I can\'t get the onkey events to fire
I had the same problem and it seems to work if you put your editable span inside another non-editable span :
div contents...
Hello
You will be able to catch keydown/keyup events both on the editor div AND in your span1.
EDIT: you need the inner span to have the focus to catch keydown events coming from it. Use the DOM method .focus() to do so.