tooltip on Confluence page

Hi, Can I include tooltips in my Confluence page, which would pop-up when I mouse -hover the text ? pls provide any detail that would be useful for me - on this front.

 

Thanks.

Jyothi

3 answers

2 votes
Davin Studer Community Champion Sep 15, 2015

Here is a user macro I created a while ago for this.

Macro Body Processing:
Rendered

Template: 

## Developed by: Davin Studer
## Date created: 04/30/2014
 
## @param Tip:title=Tool Tip|type=string|required=true|desc=What will be displayed when the cursor hovers over this area?
 
#set( $id = $action.dateFormatter.calendar.timeInMillis )
#set( $d = '$' )
#set( $p = '#' )
#requireResource("com.atlassian.auiplugin:aui-experimental-tooltips")
 
<span id="content$id" title="$paramTip">$body</span>
<script type="text/javascript">
AJS.toInit(function(){
    AJS.${d}("${p}content$id").tooltip({gravity: 's'});
});
</script>

As administrator can add a user macro - see Charles Halls comment in this question: https://confluence.atlassian.com/display/DISC/Add+Tool+Tip+to+Normal+Text

## Macro title: My Macro
## Macro has a body: Y
## Body processing: Rendered
## Written by: Charles Hall
## Date installed: 
## Installed by: 

## @param tip:title=Tooltip text|type=string|required=true|default=Tooltip text|desc=Enter the text you want to appear as the tooltip
## @param bordercolour:title=Underline Colour|type=string|required=false|default=#336699|desc=Enter the hexadecimal colour code for the bottom border colour used for the dotted underline.
 
## Set default values
#if (!$paramtip)
  #set ($paramtip="Add Tooltip text here")
#end
#if (!$parambordercolour)
  #set ($parambordercolour="#336699")
#end
 
#set($tip=$paramtip)
#set($color=$parambordercolour)
 
<a style="text-decoration:none; border-bottom:1px dotted; border-bottom-color:$color" title="$tip">$body</a>

Hi Jyothi,

Another options is the free Tooltips add-on. It allows adding tooltips over any content without needing to use macros. Hope that helps!

-Mike

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,147 views 20 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you