我有一个TextArea(),我正在从中收集用户输入.
我想将此输入反馈到电子邮件中,但保留格式非常重要.如果有人将回报或段落放在一起来分隔他们的陈述,我希望将其反映在输出中.
目前,我将此输入分配给变量,然后在MailApp()调用中引用该变量.它不是通过此过程保留格式:
var user_input=e.parameter.text_area_input;
MailApp.sendEmail({
to: "someemail@somedomain.com",
subject: "This is a subject.",
htmlBody: "Here is the text that was entered: <BR>" + user_input
})
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?