Marcin Wisniowski
02/15/2026, 4:33 PMAnnotatedString with LinkAnnotation, and this works fine for styling and clicking the links. But my links also need right-click context menus (which can be different for each link), and LinkAnnotation does not have a right-click interaction listener.
What would be the correct way to implement this? I need to know that a link was right-clicked, and need to know the coordinates so that I can draw the context menu at that place.Jonas
02/16/2026, 7:30 AMappendInlineContent
But not sure if that is the right way or whether its comfortable to implement.Aditya Bhaskar
02/16/2026, 8:36 AMModifier.onTextLayout and Modifier.onPointerInput. The first will let you find binding boxes for your linked text. The second will give the offsets on right click. Check whether the offset lies inside the bounding boxes and show a context menu at the offset.Halil Ozercan
02/17/2026, 1:54 PMHalil Ozercan
02/17/2026, 1:55 PMMarcin Wisniowski
02/21/2026, 11:32 PMMarcin Wisniowski
02/22/2026, 2:21 AM