I am using jQuery 1.8.3 and jQuery UI 1.9.2.
My web application has got some draggable elements and I would like to allow the user to select some text in the contained elements.
I’ve seen there are some other questions on this topic.
Another path I am following is use the right-click of the mouse and use some text-selection plug-in I have found.
Still I can’t make it work.
It seems that draggable/sortable elements don’t allow text selection or can intercept mouse (clicks) events.
Any ideas?
I believe your approach is correct and that you can use right-click to copy the text from certain divs.
E.g. with:
as well as including jquery-ui, the following JavaScript should allow you to use left-click to drag and drop a div, and right-click to copy the text within the div:
I have a jsfiddle for this but I think the SWF copy with ZeroClipboard doesn’t agree with jsfiddle.
But it should work in your development environment.