Originally Posted by sirajul
Yes, i'm using jquery version 1.8.3.
that's on purpose. WYWIWYG mode changes the normal event bindings so that , eg, [CTRL]+[B] turns the selection bold.
i don't think you can bind events on editable sub-tags.
also, using many contentEditables will get you in a heap of trouble quick once people start adding new lines.
that's not to say you can't watch the event on sub-tags, you just can't directly bind them.
Event delegation works fine, at least in a quick mini-test i just completed:
<div id="editor" contentEditable=true>
<code> this is a line of code</code>
<code> this is another line of code</code>
alert( t.outerHTML );
BROWSER STATS [% share]
(2013/10/31) IE7:0.5, IE8:8.6, IE9:5.3, IE10:12.3, FF:17.7, CH:41.8, SF:8.1, MOBILE:20.4