mark selected text as ref for callout #5106
Unanswered
amitbenaim1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’m integrating Monaco Editor with Fluent UI React, and I want to show a Callout component positioned near the user’s selected text (for example, a selected query).
When the hover action runs, I’d like to open a Fluent UI Callout whose target points to the selected text (or the hover position).
The Callout requires a DOM reference or { x, y } coordinates, but Monaco’s hover provider doesn’t seem to expose an element reference.
I’ve tried computing coordinates from the editor selection but it doesn't seem to work.
I've also seen these discussions:
#4103, #801 (comment)
but they seem open.
Is there a reliable way to anchor an external React element (like a Fluent UI Callout) to that location, so it moves correctly with scrolling and zooming?
Any guidance or example would be greatly appreciated 🙏
Thank you
Beta Was this translation helpful? Give feedback.
All reactions