From 9f5ecd8071009d5fae077bec0ce60338a1711241 Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Thu, 10 Sep 2026 23:53:26 +0200 Subject: [PATCH] fix: a frame placed against the page lands there MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Word's positionV relativeFrom="page" and ODF's style:vertical-rel="page" — how a cover page's own blocks are placed — were dropped by both importers, so every such frame sat at its anchor paragraph instead: a title page's coloured blocks landed wherever the text happened to end. The offset now rides `wrapFromPage` on the frame, the node view resolves the page the anchor lands on from the page grid, and both exports write the relation back. A shape behind the text also goes under a picture behind it (z-index -2, the sheet moving to -3): probed against LibreOffice, which paints a cover picture over a shape whatever stacking order the file gives them. Claude-Session: https://claude.ai/code/session_01Wzs2qG6Y5qm7mKmJHfu44G --- src/lib/components/PageSheetLayer.svelte | 6 +++--- src/lib/editor/extensions/image.ts | 25 +++++++++++++++++++++- src/lib/editor/extensions/textBox.ts | 17 +++++++++++++-- src/lib/export/docx.ts | 19 +++++++++++------ src/lib/export/odt.ts | 12 ++++++++--- src/lib/import/docx.ts | 27 +++++++++++++++--------- src/lib/import/odt.ts | 13 ++++++++---- src/styles/editor.css | 4 ++-- 8 files changed, 91 insertions(+), 32 deletions(-) diff --git a/src/lib/components/PageSheetLayer.svelte b/src/lib/components/PageSheetLayer.svelte index 115e0c8..aae5f9d 100644 --- a/src/lib/components/PageSheetLayer.svelte +++ b/src/lib/components/PageSheetLayer.svelte @@ -14,12 +14,12 @@