🎨 Pandoc template for exporting docx Fix https://github.com/siyuan-note/siyuan/issues/8740

This commit is contained in:
Daniel 2023-09-09 16:38:03 +08:00
parent 982e109af4
commit cc8ee6219c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
9 changed files with 39 additions and 5 deletions

View file

@ -76,6 +76,13 @@ export const exportConfig = {
</div>
<input class="b3-text-field fn__flex-center fn__size200" id="pdfFooter">
</label>
<label class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.export25}
<div class="b3-label__text">${window.siyuan.languages.export26}</div>
</div>
<input class="b3-text-field fn__flex-center fn__size200" id="docxTemplate">
</label>
<label class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.export13}
@ -127,6 +134,7 @@ export const exportConfig = {
</label>`;
},
bindEvent: () => {
(exportConfig.element.querySelector("#docxTemplate") as HTMLInputElement).value = window.siyuan.config.export.docxTemplate;
(exportConfig.element.querySelector("#pdfFooter") as HTMLInputElement).value = window.siyuan.config.export.pdfFooter;
(exportConfig.element.querySelector("#blockRefTextLeft") as HTMLInputElement).value = window.siyuan.config.export.blockRefTextLeft;
(exportConfig.element.querySelector("#blockRefTextRight") as HTMLInputElement).value = window.siyuan.config.export.blockRefTextRight;
@ -142,6 +150,7 @@ export const exportConfig = {
blockEmbedMode: parseInt((exportConfig.element.querySelector("#blockEmbedMode") as HTMLSelectElement).value, 10),
fileAnnotationRefMode: parseInt((exportConfig.element.querySelector("#fileAnnotationRefMode") as HTMLSelectElement).value, 10),
pdfFooter: (exportConfig.element.querySelector("#pdfFooter") as HTMLInputElement).value,
docxTemplate: (exportConfig.element.querySelector("#docxTemplate") as HTMLInputElement).value,
blockRefTextLeft: (exportConfig.element.querySelector("#blockRefTextLeft") as HTMLInputElement).value,
blockRefTextRight: (exportConfig.element.querySelector("#blockRefTextRight") as HTMLInputElement).value,
tagOpenMarker: (exportConfig.element.querySelector("#tagOpenMarker") as HTMLInputElement).value,