Multiline notifications

Hi

Is it possible to create multi line notifications? I have tried adding \n and
to the message string but no joy.

Thanks
Tim

Hi Tim,

Not possible at the moment - I'll check to see if we can enabled this!

Best Regards,
Vladimir

You can add the following CSS to server\wwwroot\assets\css\styles.css:

.ui-growl-message {
  display: flex;
}

.ui-growl-title {
  margin-right: 8px;
}

.ui-growl-message p {
  white-space: pre-line;
}

It would then display \n as new lines:

1 Like

Brilliant, works a charm! thanks for your always excellent customer support.

Tim

Doesn't seem to work for me.

Hi @Peter_Chikov,

Indeed this CSS won't work as it using a 5 year old rendering which has been retired long ago :slight_smile:

Now you can use Style="white-space: pre-wrap":

new NotificationMessage { 
    Severity = NotificationSeverity.Info, 
    Style="white-space: pre-wrap",
    Detail = "Info\nDetail"
}

Or if you want to enable it globally:

.rz-notification-content {
   white-space: pre-wrap;
}
1 Like