Friday, 27 September 2013

Show a menu on text selection

Show a menu on text selection

I want to be able to display a popover menu when a user highlights a
selection of text in a text area or content-editable. As far as I can
tell, Angular doesn't have any event binding around text selection, so has
anyone come across a solution for doing this whether it be in a directive
or otherwise?
A decent example of the intended behavior is if you go to
http://www.zenpen.io/ and highlight come of the text. A small menu comes
up. That is the behavior I am looking to emulate.

No comments:

Post a Comment