I feel like this should be pretty simple, but I can't find anything about it. I want my message that pops up in a ui.alert window to bold certain words and split a string at , into new lines. Here is the code I have:
function send(){
var ui = SpreadsheetApp.getUi();
var bccSend = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('main_gen').getRange(2,2).getValue(); //value example is xxx@gmail.com, yyy@gmail.com
var bccSendReplace = bccSend.toString().replace(/,/g,"<br>");
var response = ui.alert('You are about to send this to the following email address(es): \n\n' + bccSendReplace + '\n\n Click OK to send, otherwise, close this box or click Cancel to abort.', ui.ButtonSet.OK_CANCEL);
}
The bccSendReplace is what I want to parse at commas into new lines. Instead, the code just replaces the comma with <br>. I would also like all text within bccSendReplace to be bold. Any ideas? Thanks!