search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to wrap the text within the event if we have long text?

Asked by pushplata
1 year ago.

Hi,

i'm trying to create an event with long text data and i have to wrap the text within that event.i'm trying to give css within onBeforeCellRender but its not working.plz help me for this issue.

Answer posted by Dan Letecky [DayPilot]
1 year ago.

You can enable text wrapping using the "eventTextWrappingEnabled" property:
https://api.daypilot.org/daypilot-scheduler-eventtextwrappingenabled/

You can also use HTML line breaks (<br>) in the event HTML. Just remember that in that case you need to HTML-encode the text to prevent XSS attacks.

Comment posted by pushplata
1 year ago.

Under which event call we should keep "eventTextWrappingEnabled" property ?
so that after event creation it will reflect on event

Comment posted by Dan Letecky [DayPilot]
1 year ago.

This is a property of DayPilot.Scheduler. It needs to be set before events are rendered. You can initialize it when creating the DayPilot.Scheduler object:

const scheduler = new DayPilot.Scheduler("dp", {
  eventTextWrappingEnabled: true,
  // ...
});
scheduler.init();
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.