Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › General Discussions › Tooltip › Inserting a br in a tooltip
- This topic has 6 replies, 2 voices, and was last updated 3 years ago by
svetoslav_borislavov.
-
AuthorPosts
-
December 30, 2022 at 4:49 pm #104162
tbettinazzi@axioma.it
ParticipantI need to “break” a tooltip in 2 or more lines using something like html <br>.
My code is generated and, where needed, I use a placeholder (#BR#) in the place where the line should be broken.
At runtime, with some js, I need to substitute the placeholder with the appropriate character sequence (is it <br> ?) but I don’t find the way to substitute it.
I can’t use id because my code is generated at runtime and I don’t now ids in advance.
How can I solve ?
Tks
January 3, 2023 at 6:22 am #104163svetoslav_borislavov
ParticipantHi,
How are you planning to replace the content when you are using runtime-generated ids?
Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/January 3, 2023 at 10:57 am #104164tbettinazzi@axioma.it
ParticipantIn other situation I used css classes but with smart-tooltip I wasn’t able to find a suitable class.
Tks
January 9, 2023 at 8:33 am #104174tbettinazzi@axioma.it
ParticipantNo suggestions ?
Tks
January 9, 2023 at 11:55 am #104175svetoslav_borislavov
ParticipantHi,
As far as I understood, you are trying to have an element for example paragraph.
There is another element with a class that acts as a placeholder and when needed you replace this element with a ‘br’ tag.Here is a demo of doing what I explained: https://codepen.io/svetoslavb04/pen/NWBdJrp
Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/January 9, 2023 at 1:55 pm #104182tbettinazzi@axioma.it
ParticipantElegant solution but it doesn’t fit completely in my environment.
I know if a tooltip should contain a break line if in the text I’ve a placeholder (#br#).
Then I need to change it in a<br/>.
In every tooltip where is present (I don’t know how many tooltip I’ve).
Tks
Tullio
January 10, 2023 at 6:47 am #104186svetoslav_borislavov
ParticipantHi,
This is a solution which replaces your placeholder with a br tag:
https://codepen.io/svetoslavb04/pen/NWBdJrpBest Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.