From 53af6731dba82ebe3f1331458ca799032ccda29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Fernandez?= Date: Tue, 16 Sep 2025 15:35:09 +0200 Subject: [PATCH] Adapt anchor type --- scripts/odf/templating/fillOdtElementTemplate.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/scripts/odf/templating/fillOdtElementTemplate.js b/scripts/odf/templating/fillOdtElementTemplate.js index b7bb92d..1cf5649 100644 --- a/scripts/odf/templating/fillOdtElementTemplate.js +++ b/scripts/odf/templating/fillOdtElementTemplate.js @@ -810,25 +810,13 @@ export default function fillOdtElementTemplate(rootElements, compartment, addIma newImageNode.setAttribute("draw:mime-type", imageMarker.odfjsImage.mediaType) const newFrameNode = currentNode.ownerDocument?.createElement('draw:frame') - newFrameNode.setAttribute("text:anchor-type", "char") + newFrameNode.setAttribute("text:anchor-type", "frame") newFrameNode.setAttribute("svg:width", "7.28cm") newFrameNode.setAttribute("svg:height", "10.239cm") newFrameNode.setAttribute("draw:z-index", "0") newFrameNode.appendChild(newImageNode) - currentNode.parentNode?.replaceChild(newFrameNode, currentNode) - - - // TODO : - // - Rajouter un fichier image dans le odt avec le ArrayBuffer comme contenu (ou autre type) - // - puis remplacer le texte par peut-être - // - // + currentNode.parentNode?.replaceChild(newFrameNode, currentNode) } else { throw new Error(`No valid OdfjsImage value has been found for expression: ${imageMarker.expression}`) }