Base solution for your next web application
Open Closed

Abp.Message - with line breaks #9205


User avatar
0
deltavision created

Hi,

using: Core, MVC, jQuery project - v7.2.2

is it possilble with: abp.message.info(message);

to show "message" with line breaks?

I have tried with \n
\r\n
<br> <br/>

but it is not working


4 Answer(s)
  • User Avatar
    0
    robert created
    Support Team

    Hello deltavision,

    Can you please try like this ?

    var content = document.createElement('div');
    content.innerHTML = 'There are some <strong>errors.</strong><br/>Please check and try again.';
    
    swal({
    content: content,
    icon: "error"
    });
    
  • User Avatar
    0
    deltavision created

    Hi robert,

    this works :-) with swal

    but not in the context with abp.message.info(message);

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you try this;

    abp.message.info("message", "title", {isHtml: true});
    

    You can use html tags in message text.

  • User Avatar
    0
    deltavision created

    Hi ismcagdas

    this works :-)

    Thank you.