How to exand selection to the tag around, after a selection by double click?

I need some code to expand the selection, to get the tag around the selected text to improve a plugin (if the user did a double click on a word)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.