Is there a way ( except Rangy library ) to change contentEditable Div InnerHTML on the fly, like on keyup, with no cursor position / focus lose? I'd like to use pure javascript code, as simple as it is possible.
for example :
<div id="divId" contentEditable="true" onkeyup="change(this)"></div>
then javascript :
function change(element)
{
element.innerHTML = element.innerHTML.replace(/.../, '...');
}
Thanks.