Search
Tooltip.template Property
See Also
 






Gets or sets the ToolTip content template.

Namespace: MindFusion.Common.UI
File: Tooltip.js

 Syntax

JavaScript  Copy Code

get template() {}

 Property Value

String. An HTML string representing the content template.

 Example

The following code creates a new instance of the ToolTip class associated with the HTMLElement of a diagram and sets its template property.

JavaScript  Copy Code

var tooltip = new ui.Tooltip(diagram._element);
tooltip.trigger = ui.TooltipTrigger.None;
tooltip.position = ui.TooltipPosition.Cursor;


var t = document.createElement("div");
var img = document.createElement("img");
img.width = img.height = "40";
img.src = "icon_fish.png";
img.style.verticalAlign = "middle";
t.appendChild(img);
var span = document.createElement("span");
span.innerText = "This user is not currently online";
t.appendChild(span);

tooltip.template = t.outerHTML;

 See Also