How to display line breaks in event box

How can I have line breaks display in the event box?

My data contains chr(13) for line breaks. This works well in the lightbox, but not in the event box (I’m using timeline Bar mode). I tried these two approaches - they don’t work:

.Templates.event_bar_text = "<div class='celltext'><%= ev.text.replace('\r','<br>') %></div>" .Templates.event_bar_text = "<div class='celltext'><%= ev.text.replace(String.fromCharCode(13),'<br>') %></div>"

Can you adivse? Thanks in advance.

It can be done using following style

.dhx_cal_event{ white-space: pre; }