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

Printing / Exporting scheduler with HTML in the events

Asked by Anonymous
8 years ago.

I am currently evaluating DayPilot, and my events contain HTML to format them the way I would like. It looks as if the current printing/exporting only displays the innerText and not the actual HTML. Is there any way around this?

Answer posted by Dan Letecky [DayPilot]
8 years ago.

At this moment the export doesn't support HTML.

There are onBefore*Export events that let you supply alternative text:

https://api.daypilot.org/daypilot-scheduler-onbeforeeventexport/
https://api.daypilot.org/daypilot-scheduler-onbeforecellexport/
https://api.daypilot.org/daypilot-scheduler-onbeforetimeheaderexport/
https://api.daypilot.org/daypilot-scheduler-onbeforerowheaderexport/

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

or

dp.onBeforeEventExport = function(args) {
  args.text = args.e.text();
};

In the future, these methods will also give you access to a canvas object that will let you customize the output image.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.