# Retrieve a sentence on click/hover in a rich text element

**URL:** <https://community.weweb.io/t/retrieve-a-sentence-on-click-hover-in-a-rich-text-element/14191>\
**Category:** How do I?\
**Created:** [October 26, 2024, 6:02pm UTC](https://community.weweb.io/t/retrieve-a-sentence-on-click-hover-in-a-rich-text-element/14191 "2024-10-26T18:02:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vi56](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/vi56/32/11392_2.png) [@Vi56](https://community.weweb.io/u/Vi56)\
**Post date:** [October 26, 2024, 6:02pm UTC](https://community.weweb.io/t/retrieve-a-sentence-on-click-hover-in-a-rich-text-element/14191/1 "2024-10-26T18:02:05Z")

</div>

Hello,  
I’m trying to highlight sentence the user hover or click on in a rich text editor. Anyone has a custom JS working to first retrieve the sentence where the user click? Struggling for a while with JS…  
(As a beginner coder Weweb trigger event also confuse me since I also set a listen event in the custom JS)

Thanks!
