Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am working for an article based website. One of the requirement is that user select text and he gets an option to highlight the selected text or takes notes.

Is there any example that I can refer?

Thanks
Posted

1 solution

This is not so easy. Please see this question and answers:
http://stackoverflow.com/questions/985272/jquery-selecting-text-in-an-element-akin-to-highlighting-with-your-mouse[^].

And here are the answers if you need to get the selected text: http://stackoverflow.com/questions/5379120/get-the-highlighted-selected-text[^].

—SA
 
Share this answer
 
Comments
Maciej Los 25-Feb-14 15:43pm    
Up-voted! Valuable answer. Why someone down-voted? I don't know.
Sergey Alexandrovich Kryukov 25-Feb-14 16:27pm    
Thank you, Maciej.
It looks like someone performed mass down-voting action, on some other experts, too... :-)
—SA
Maciej Los 25-Feb-14 16:33pm    
Several times today ;(
I "hate" people who do that without any explanation.
Sergey Alexandrovich Kryukov 25-Feb-14 16:54pm    
It's going on right now... pretty nasty and stupid...
Well, frankly, some posts do deserve down-votes without any explanations, because some just fool around and act in totally irresponsible ways. But we all usually answer pretty seriously (even if it is with humor :-)...
—SA
Maciej Los 25-Feb-14 17:06pm    
Sad, but true - as Metallica is singing ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900