mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-27 16:26:31 +01:00 
			
		
		
		
	fix(dx/share): ckcontent for share theme not preserved
This commit is contained in:
		| @@ -12,6 +12,7 @@ async function main() { | |||||||
|     // Copy node modules dependencies |     // Copy node modules dependencies | ||||||
|     build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]); |     build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]); | ||||||
|     build.copy("/node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js", "xhr-sync-worker.js"); |     build.copy("/node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js", "xhr-sync-worker.js"); | ||||||
|  |     build.copy("/node_modules/ckeditor5/dist/ckeditor5-content.css", "ckeditor5-content.css"); | ||||||
|  |  | ||||||
|     // Integrate the client. |     // Integrate the client. | ||||||
|     build.triggerBuildAndCopyTo("apps/client", "public/"); |     build.triggerBuildAndCopyTo("apps/client", "public/"); | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ import path from "path"; | |||||||
| import mimeTypes from "mime-types"; | import mimeTypes from "mime-types"; | ||||||
| import mdService from "./markdown.js"; | import mdService from "./markdown.js"; | ||||||
| import packageInfo from "../../../package.json" with { type: "json" }; | import packageInfo from "../../../package.json" with { type: "json" }; | ||||||
| import { getContentDisposition, escapeHtml, getResourceDir } from "../utils.js"; | import { getContentDisposition, escapeHtml, getResourceDir, isDev } from "../utils.js"; | ||||||
| import protectedSessionService from "../protected_session.js"; | import protectedSessionService from "../protected_session.js"; | ||||||
| import sanitize from "sanitize-filename"; | import sanitize from "sanitize-filename"; | ||||||
| import fs from "fs"; | import fs from "fs"; | ||||||
| @@ -21,7 +21,6 @@ import type AttributeMeta from "../meta/attribute_meta.js"; | |||||||
| import type BBranch from "../../becca/entities/bbranch.js"; | import type BBranch from "../../becca/entities/bbranch.js"; | ||||||
| import type { Response } from "express"; | import type { Response } from "express"; | ||||||
| import type { NoteMetaFile } from "../meta/note_meta.js"; | import type { NoteMetaFile } from "../meta/note_meta.js"; | ||||||
| import cssContent from "@triliumnext/ckeditor5/content.css"; |  | ||||||
|  |  | ||||||
| type RewriteLinksFn = (content: string, noteMeta: NoteMeta) => string; | type RewriteLinksFn = (content: string, noteMeta: NoteMeta) => string; | ||||||
|  |  | ||||||
| @@ -515,7 +514,11 @@ ${markdownContent}`; | |||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         archive.append(cssContent, { name: cssMeta.dataFileName }); |         const cssFile = isDev | ||||||
|  |             ? path.join(__dirname, "../../../../../node_modules/ckeditor5/dist/ckeditor5-content.css") | ||||||
|  |             : path.join(getResourceDir(), "ckeditor5-content.css"); | ||||||
|  |  | ||||||
|  |         archive.append(fs.readFileSync(cssFile, "utf-8"), { name: cssMeta.dataFileName }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     try { |     try { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user