DayPilot.Calendar.onBeforeEventExport

The onBeforeEventExport event is fired during image export. It allows you to provide alternative text for the event box (image export doesn't support HTML in event boxes).

Declaration

DayPilot.Calendar.onBeforeEventExport(args);

Parameters

  • args.e - exported event (DayPilot.Event)
  • args.text - exported text
  • args.backColor
  • args.borderColor
  • args.fontSize
  • args.fontFamily
  • args.fontStyle
  • args.fontColor
  • args.horizontalAlignment ("left" | "right" | "center")

Example

Basic HTML to text conversion - replaces line breaks:

dp.onBeforeEventExport = function(args) {
  args.text = args.e.client.html().replace("<br>", "\n");
};