Autocomplete popup - show tooltip/docs on row hover

1,365 views
Skip to first unread message

Shweta Karol Minhas

unread,
Mar 20, 2014, 8:47:55 AM3/20/14
to ace-d...@googlegroups.com
Is there a way to show some kind of documentation on hovering over a row in the ace autocomplete popup?

Harutyun Amirjanyan

unread,
Mar 23, 2014, 12:34:54 PM3/23/14
to ace-d...@googlegroups.com

Shweta Karol Minhas

unread,
Mar 24, 2014, 8:07:59 AM3/24/14
to ace-d...@googlegroups.com
Thank You!
I got this working.
To summarize, this requires us to create our own element for the tool tip, and show it on the changeHoverMarker event.

Is it also possible to manipulate some (not all) rows of the popup to display an image alongside the text?

Regards,
Shweta


On Sunday, March 23, 2014 10:04:54 PM UTC+5:30, Harutyun Amirjanyan wrote:
see https://groups.google.com/d/msg/ace-discuss/agGA1gHoZG0/bNcgrDm2y1AJ

Shweta Karol Minhas

unread,
Apr 2, 2014, 9:17:50 AM4/2/14
to ace-d...@googlegroups.com
I see a property popup.$imageSize, but cannot find a way to use it to display the image.

Harutyun Amirjanyan

unread,
Apr 4, 2014, 6:20:05 PM4/4/14
to ace-d...@googlegroups.com
Hi
Adding Icons should be possible with `className` property on objects
returned by completer
and some css for `:before` see
https://github.com/ajaxorg/ace/blob/master/lib/ace/autocomplete/popup.js#L189

Shweta Karol Minhas

unread,
Apr 14, 2014, 6:45:23 AM4/14/14
to ace-d...@googlegroups.com
Thank you very much for your guidance! 
I will try this out. This will solve a major impediment in my application. 

Regards,
Shweta

XiaoMing Zhang

unread,
Nov 25, 2015, 6:56:51 AM11/25/15
to Ajax.org Cloud9 Editor (Ace)
@Shweta
How did you resolve it?
Could you give me some sample codes?

@Harutyun
Why not just add an attribute in completions, then the completion can show the tooltips when the attribute exists.
For example,

completions.push({
   description: "my description of this proposal",
});

Harutyun Amirjanyan

unread,
Nov 26, 2015, 7:40:57 PM11/26/15
to ace-d...@googlegroups.com
It is already just an attribute in completions either docText or docHTML
https://github.com/ajaxorg/ace/blob/v1.2.2/lib/ace/autocomplete.js#L371


--
You received this message because you are subscribed to the Google Groups "Ajax.org Cloud9 Editor (Ace)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ace-discuss...@googlegroups.com.
To post to this group, send email to ace-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/ace-discuss.
For more options, visit https://groups.google.com/d/optout.

Shweta Karol

unread,
Nov 26, 2015, 9:04:17 PM11/26/15
to ace-d...@googlegroups.com
@XiaoMing Zhang
I do not have the code sample at the moment but as I said I had created a new Ext.Tooltip element, set it's properties as applicable and then tooltip.show() on the changeHoverMarker event.

Since this was like more than a year and half ago I believe there already might have been improvements in this area and better ways to do it.

Sent from my iPhone
You received this message because you are subscribed to a topic in the Google Groups "Ajax.org Cloud9 Editor (Ace)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ace-discuss/7Nb9jwdroO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ace-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages