diff --git a/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx b/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx index d69f6ae..93cd78a 100644 Binary files a/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx and b/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx differ diff --git a/renderer/carbone-templates/registry.json b/renderer/carbone-templates/registry.json index ce6829e..2c0a881 100644 --- a/renderer/carbone-templates/registry.json +++ b/renderer/carbone-templates/registry.json @@ -6,6 +6,6 @@ "originalName": "master_cv_template.docx", "path": "/root/workspace/cv-app/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx", "uploadedAt": "2026-07-16T09:03:29.601Z", - "updatedAt": "2026-07-16T11:15:01.909Z" + "updatedAt": "2026-07-16T11:17:19.354Z" } ] \ No newline at end of file diff --git a/static/carbone.js b/static/carbone.js index 87d83e2..dc5f3e0 100644 --- a/static/carbone.js +++ b/static/carbone.js @@ -275,7 +275,9 @@ async function openOnlyofficeEditor(templateId, templateName) { const config = data.config; const onlyofficeUrl = data.onlyofficeUrl; - // Build the editor modal + // Build the editor modal with a unique container ID each time + // so ONLYOFFICE never reuses a cached DOM element + const containerId = 'oo-editor-' + Date.now(); const body = `

Editing: ${templateName}

@@ -284,7 +286,7 @@ async function openOnlyofficeEditor(templateId, templateName) {
-
+

Changes are saved automatically. Click "Save" to force-save, or "Close Editor" to return to the template list.

`; showModal(body, '', 'xlarge'); @@ -307,7 +309,7 @@ async function openOnlyofficeEditor(templateId, templateName) { throw new Error('ONLYOFFICE API not loaded. Check that the server is running at ' + onlyofficeUrl); } - onlyofficeEditorInstance = new DocsAPI.DocEditor('onlyoffice-editor-container', { + onlyofficeEditorInstance = new DocsAPI.DocEditor(containerId, { ...config, width: '100%', height: '800px', @@ -354,8 +356,10 @@ function closeOnlyofficeEditor() { onlyofficeEditorInstance = null; } closeModal(); - // Refresh the templates list to show any changes - loadOnlyofficeTemplates(); + // Wait 1.5s for ONLYOFFICE save callbacks to settle, then refresh + setTimeout(() => { + loadOnlyofficeTemplates(); + }, 1500); } // Call status check when templates page becomes active diff --git a/static/index.html b/static/index.html index 6d81234..83c8ff3 100644 --- a/static/index.html +++ b/static/index.html @@ -139,7 +139,7 @@ - - + + \ No newline at end of file