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
Because the span1 is not a contenteditable so it will not fire any event.
You can set contenteditable on child too, but it will not fired because the wrapping contenteditable div editor catch the events before the inner span, so they are not fired on the child span1.
So you can change your code in:
div contents...
Hello
World
Demo: http://jsfiddle.net/IrvinDominin/U8wnK/
Side note: I think it's better to explicit the boolean value of contenteditable in your markup