How to add newline to Message?
How to add newline to Message?
I have this code under an inline "Delete" button:
$('#datatable').on('click', 'td.editor-delete button', function (e) {
// Get the row data.
var td = $( this ).closest( 'td' );
var rowdata = oTable.row( td ).data();
var details = '"' + rowdata.Songs.title_for_display + '"' + " (Id: " +rowdata.Songs.song_id + ")";
oEditor.remove($(this).closest('tr'), {
title: 'Delete record',
message: "Are you sure you want to remove this record?" + "\r\n" + details,
buttons: 'Delete'
});
});
The message and details are shown, but the newline is ignored. I have used this newline elsewhere in js with no problem. Is there anything different about "message" in this example?
Answers
Looks like that message is shown in a modal. In that case use the HTML
<br>
like this:Kevin