To add line breaks to Scheduler event text, you need to use the "html" property and insert "<br>" tags. The text provided using the "text" property will be HTML-encoded automatically (XSS protection is enabled by default).
This can be done on the server side (you can send the desired HTML) or you can convert the text to HTML on the client side using onBeforeEventRender event (https://api.daypilot.org/daypilot-scheduler-onbeforeeventrender/).
The following example will convert '\n' characters in the text to "<br>" tags and HTML-encode the other content:
onBeforeEventRender: args => {
const lines = args.data.text.split("\n").map(line => DayPilot.Util.escapeHtml(line));
args.data.html = lines.join("<br>");
}