DayPilot.Scheduler.onBeforeCellExport

The onBeforeCellExport event is fired during image export (JPEGPNGSVG) and direct printing. Allows you to provide alternative text for the Scheduler grid cell (image export doesn't support HTML in grid cells).

Declaration

DayPilot.Scheduler.onBeforeCellExport(args);

Parameters

  • args.areas - an array of active areas (areas defined using onBeforeCellRender are copied); since 2021.4.5168
  • args.cell - exported grid cell object (read-only)
  • args.fontColor - font color; since 2021.4.5168
  • args.fontFamily - font family; since 2021.4.5168
  • args.fontSize - font size; since 2021.4.5168
  • args.fontStyle -font style; since 2021.4.5168
  • args.text - exported text
  • args.horizontalAlignment - "left" | "center" | "right"
  • args.backColor - background color

The args object is the same instance that is used in onBeforeCellRender (which is called right before onBeforeCellExport).

Example

Basic HTML to text conversion - replaces line breaks:

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