View Single Post
Old 11-29-2012, 08:25 AM   PM User | #3
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
so, I have:
Code:
<div contentEditable ="true" ...
and selected text inside that.

Code:
  <img src = '...'  onclick = "document.execCommand('underline')" />
Clicking there works, the text inside div stays selected and becomes underlined;

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. ...
__________________
Found a flower or bug and don't know what it is ?
agrozoo.net galery
if you don't spot search button at once, there is search form:
agrozoo.net galery search

Last edited by BubikolRamios; 11-29-2012 at 08:34 AM..
BubikolRamios is offline   Reply With Quote