question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltip : render HTML

See original GitHub issue

Hi,

Is there a way to render HTML inside the tooltip ? In my case, I would like to render some <br/> tags but it’s not working.

How can I render the br ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
mackelitocommented, Jul 11, 2017

@willshowell I understand that it will not be supported due to Material Design Spec. But as a note… the spec are guidelines and not meant to be enforced 😉

I have no need for this feature but I do understand that there are requests for it as it is pretty common in other frameworks

5reactions
bebelzcommented, Jul 11, 2017

HTML is not supported in tooltips for now but you can replace <br/> with \n and override your css with :

.mat-tooltip {
  white-space: pre-line;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I use complex HTML with Twitter Bootstrap's Tooltip?
The html parameter specifies how the tooltip text should be turned into DOM elements. By default Html code is escaped in tooltips to...
Read more >
Tooltips - Bootstrap
Documentation and examples for adding custom Bootstrap tooltips with CSS and ... If true, HTML tags in the tooltip's title will be rendered...
Read more >
How to Create an HTML Tooltip [+ Code Templates]
A tooltip is a user interface component containing text that appears when a user hovers their cursor over an element. A tooltip usually...
Read more >
Using any HTML inside the tooltip - jQuery TOOLS
Tooltip content can be any HTML, not just plain text. Move your mouse over the Download button and you'll see a tooltip that...
Read more >
Bootstrap 4 Tooltip - W3Schools
Bootstrap 4 Tooltip. The Tooltip component is small pop-up box that appears when the user moves the mouse pointer over an element: Hover...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found