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

Svg export bug

Asked by João Louro
7 years ago.

I have found a bug on svg export.

If you try to export a calendar to svg and that calendar has background colors on the header and custom text on the cells they will not be displayed properly on the svg file.

The header colors will not show up at all.
On the custom cells the color will appear but instead of showing the text (eg. refresh) it will display the html of that cell.

See files atached for a better perception of the error.

The png file is a print screen from the calendar on the website, the svg file is the result of an export.

Comment posted by João Louro
7 years ago.

EDIT:
This bug will happen in any export format.

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

The time header background color should now work properly with the latest sanbox build (8.3.2737):

https://javascript.daypilot.org/sandbox/

The export doesn't support HTML in the Scheduler elements at the moment (at it won't support it in the near future). You'd need to use onBeforeCellExport to provide an alternative text:

dp.onBeforeCellExport = function(args) {
 args.text = args.text.replace(/<(?:.|\n)*?>/gm, '');  // remove HTML tags
};
Comment posted by João Louro
7 years ago.

Thanks for the heads up Dan, good to know one has been fixed and that the other has a workaround

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