0
我想導出劍道編輯器的內容與pdfExport事件,並另外添加索姆文本作爲標題。pdf導出劍道編輯器
我最終要回到最初的內容值。
我試圖使用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");
問題是我總是得到原始內容導出,並忽略頭。