Tooltips using InlineDecoration (how to have child in inlines)

I am creating a Linter that will need to have tootips for found issues. I am using as example: ProseMirror lint example Now I would like to show a tooltip on mousehover to provide more context to the user. I was planning to use the following tooltips system: How To Create Tooltips But I need to be able to had a child with the tooltipcontent to the inline. How can I add a child to an inlineDecoration?

You can’t. But you could use the screen coordinates of the hovered-over content to overlay an element on the editor, or use a widget decoration to add an element somewhere near the relevant content.

Thanks for your answer. I tried the widget option but It is not what I am looking for. Your “hovered-over content to overlay” looks promising but I am not sure I understand where to start. Do you have any pointer or further reference to help.

Thanks!

See ProseMirror tooltip example

Thanks. They are using selection, can we do the same with mouse Hover? How can we gen mouse events?