so, I have:
and selected text inside that.
<div contentEditable ="true" ...
Clicking there works, the text inside div stays selected and becomes underlined;
<img src = '...' onclick = "document.execCommand('underline')" />
I have span, onclick it produces js generated color picker. And at that moment (clicking) text get deselected. Way around that ?
Edit: If I replace span with img, selected text is not deselected ! But unfortunately it gets deselected, selecting color in color picker. ...