Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #104162

    I 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

     

    #104163

    Hi,

    How are you planning to replace the content when you are using runtime-generated ids?

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

    #104164

    In other situation I used css classes but with smart-tooltip I wasn’t able to find a suitable class.

    Tks

    #104174

    No suggestions ?

    Tks

    #104175

    Hi,

    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 Borislavov

    Smart UI Team
    https://www.htmlelements.com/

    #104182

    Elegant 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

     

    #104186

    Hi,

    This is a solution which replaces your placeholder with a br tag:
    https://codepen.io/svetoslavb04/pen/NWBdJrp

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.