JPM: How to personalize a toggle button tooltip label

48 Views Asked by At

I have a toggle button in my addon. I want to personalize the CSS inside tooltip label who appear when you hover the button.


Below example with Firebug icon tooltip label

enter image description here


This is my toggle button

var button = ToggleButton({
  id: "S1",
  label: "Ultimate",
  icon: {
    "16": "./16-disabled.png",
    "32": "./32-disabled.png",
    "64": "./64-disabled.png"
  }
});

I have try a lot of solutions but never works.

label: "<strong>Ultimate</strong>" // Result: <strong>Ultimate</strong>
label: "<b>Ultimate</b>" // Result: <b>Ultimate</b>
label: "<div style='font-weight:bold'>Ultimate</div>" // Result: <div style='font-weight:bold'>Ultimate</div>

Just the \n\r work

label: "Ultim\nate" // Result: Ultim
                               ate
0

There are 0 best solutions below