use-text-selection
use-text-selection copied to clipboard
Expose commonAncestor from Hook
I wanted access to the commonAncestor
property of the document's current selection.
Pretty simple change. Let me know if there are any issues or concerns (I haven't worked extensively with the selection API in Javascript).
Updated the documentation to match the feature. Also forked a version on npm with this feature which I can deprecate if you decide to merge this in.
https://www.npmjs.com/package/@brwarner/use-text-selection