Context Menu - how to read the underlying text
https://www.youtube.com/watch?v=YUfa43NXSGY&ab_channel=toddle This tutorial is helpful but if we put a context menu on a contenteditable div , for example , how can we know what text was selected when they right clicked ? function getSelection (event , ctx ) { const userSelection = window .getSelection ( ) ; const selectedText = userSelection .toString ( ) ; ctx .triggerActionEvent ( 'selectedText ' , selectedText ) ; } Thanks Lucas . because I want them to just select the text and that triggers the pop up to show . then i use your action to get the text that was selected . How do I get it to trigger the menu when they do a selection