feat: 将主题令牌接入 DOCX 动态模板
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
import path from "node:path";
|
||||
import {
|
||||
DocxExportService,
|
||||
DocxThemeTokenService,
|
||||
MAXIMUM_MARKDOWN_LENGTH,
|
||||
readDocxExportRuntimeLimits,
|
||||
type ApplicationService
|
||||
@@ -159,6 +160,9 @@ export class DesktopApplicationController {
|
||||
const pandocRuntime = new PandocRuntime({
|
||||
desktopResourcesPath: options.desktopResourcesPath
|
||||
});
|
||||
this.#docxMediaEngine = new ElectronDocxMediaEngine({
|
||||
renderUrl: options.docxRenderUrl
|
||||
});
|
||||
this.#docxExportService = new DocxExportService({
|
||||
application: this.#applicationService,
|
||||
runtime: pandocRuntime,
|
||||
@@ -169,11 +173,11 @@ export class DesktopApplicationController {
|
||||
import.meta.url
|
||||
)
|
||||
}),
|
||||
themeTokens: new DocxThemeTokenService(
|
||||
this.#docxMediaEngine
|
||||
),
|
||||
limits: readDocxExportRuntimeLimits()
|
||||
});
|
||||
this.#docxMediaEngine = new ElectronDocxMediaEngine({
|
||||
renderUrl: options.docxRenderUrl
|
||||
});
|
||||
}
|
||||
|
||||
async initialize() {
|
||||
|
||||
Reference in New Issue
Block a user