Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

line breaks in dialog service content ignored

Inserting line breaks in content of kendo dialog service window. Kendo Angular 6 dialog in @rogress. line break characters are ignored.

tried html element br and \n, \n. e.g. It displays the character text "\n\n\n" in one continuous line

const dialog: DialogRef = this.dialogService.open({
  title: alertTitle,
  content: "Want multiple line breaks here-> \n\n\n so this appears 3 lines below on another line",
  actions: a,
  width: 400,
  height: 205,
  minWidth: 250
});
like image 407
cradokski Avatar asked Dec 29 '25 09:12

cradokski


1 Answers

Fix was to override the Kendo styles for the class .k-dialog-content { // allow new lines and spaces in dialog popup white-space: pre-wrap; }

like image 123
cradokski Avatar answered Jan 02 '26 08:01

cradokski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!