DayPilot.Scheduler.onBeforeEventExport

Fired during image export (JPEGPNGSVG) and direct printing. Allows you to provide alternative text for the event box (image export doesn't support HTML in event boxes).

Declaration

DayPilot.Scheduler.onBeforeEventExport(args);

Parameters

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

Example

Basic HTML to text conversion - replaces line breaks:

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