【发布时间】:2016-11-17 11:50:08
【问题描述】:
我想用 pdfExport 事件导出剑道编辑器的内容,并另外添加一些文本作为标题。
最后我想回到原始值,即第一个内容。
我尝试使用e.promise.done 作为事件来检测导出终止。
var meetingsEditorParams = {
tools: ['bold', 'italic', 'underline', 'strikethrough', 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'insertUnorderedList', 'insertOrderedList', 'indent', 'outdent', 'createTable', 'addRowAbove', 'addRowBelow', 'addColumnLeft', 'addColumnRight', 'deleteRow', 'deleteColumn', 'formatting' ,'pdf'],
stylesheets: ["../../../../Content/css/pdf-export-styles.css"],
pdf: {
fileName: "RECAP-TO-PRINT : " + self.fileName + ".pdf",
paperSize: "a4",
margin: {
bottom: 20,
left: 20,
right: 20,
top: 20
}
},
pdfExport: function (e) {
//add the header to the original content and export it
self.meetingEditor.value("Header To Insert" + self.Content());
// go back to the original content after the export
e.promise.done(self.meetingEditor.value(self.Content()));
}
,
change: function (e) {
console.log(self.meetingEditor.value());
self.Content(self.meetingEditor.value());
}
};
self.meetingEditor = $("#meetingEditor").kendoEditor(meetingsEditorParams).data("kendoEditor");
问题是我总是导出原始内容并且它忽略了标题。
【问题讨论】:
标签: javascript kendo-ui pdf-generation