Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create hover error messages in Ace code editor

I am using an Ace editor to display code on a website. I would like to be able to highlight ranges of code and display an error message when they are hovered over, as shown in the picture.

What I would like to accomplish

I'm not sure if this can be done using the Ace editor API, or if I need to use the magic of jQuery.

like image 460
DanielGibbs Avatar asked Apr 12 '26 00:04

DanielGibbs


1 Answers

There isn't ready to use api for this.

Tooltip can be added similar to token_tooltip in ace, but it needs some reworking, to add an arrow and not move with the mouse.

like image 126
a user Avatar answered Apr 13 '26 21:04

a user