Hi,
Is there a way to insert a line break in the text of a tooltip?
Thank you in advance.
How to insert line break in p:tooltip
Sure, why not. You can use not escaped text inside pe:tooltip
Code: Select all
<pe:tooltip for="...">
<h:outputText value="My first line <br/> My second line" escape="false" />
</pe:tooltip>
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
Hello, what tooltip are you using?
I m using <p:tooltip> when i want to enter some code like < it says i m not allowed to. Is it possible to get a linebreak in this one too?
Best Regards
Vincenz
I m using <p:tooltip> when i want to enter some code like < it says i m not allowed to. Is it possible to get a linebreak in this one too?
Best Regards
Vincenz
-------------------------
Austrian Student, learning Primefaces
Using:
Primefaces 4.0
JSF 2.2
Glassfish 4.0
Austrian Student, learning Primefaces
Using:
Primefaces 4.0
JSF 2.2
Glassfish 4.0
Just ran into the same problem myself, moessi. I managed to solve it by using two h:outputText tags with a br tag between them.
My guess would be that you can put a number of things inside the p:tooltip tag, but I haven't tried and don't know for certain what is/isn't supported.
Code: Select all
<p:tooltip for="...">
<h:outputText value="My first line" escape="false" />
<br />
<h:outputText value="My second line" escape="false" />
</p:tooltip>
It works with <p:tooltip> too if the "p" is defined as 'xmlns:p="http://primefaces.org/ui"' which is your case, I think.
Just put <h:outputText> into your tooltip as suggested above by Oleg.
Just put <h:outputText> into your tooltip as suggested above by Oleg.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest