Commit Graph
30 Commits
Author SHA1 Message Date
Steffen Becker 583bc0ddd8 fix: a list number wider than the hanging indent pushes the text
The marker pseudo is floated into the indent instead of absolutely
positioned, so a label the indent cannot hold — a "1.1.1." outline number,
a Roman numeral — moves the first line right the way both word processors
do, rather than printing over the words it labels. Out of flow either way,
so no list line grows.

The PDF clone's injected marker follows suit, and its chain now reads the
effective numbering and walks to the outermost multilevel list: a list
numbered by a named style had none of its own and printed a bare separator.
2026-09-04 19:30:04 +02:00
Steffen Becker 4b66631b56 feat: the Review tab picks how much markup is shown and where
One button per kind shows or hides it and its caret says where its cards go —
balloons or the pane, which is why the two pane toggles are gone. Display for
review carries Word's four modes beside them, and the accept / reject / walk
pairs sit under each kind. The PDF path takes the mode as page attributes, so
a printout of a page in no markup reads as the page does.
2026-09-04 19:30:03 +02:00
Steffen Becker f51e3377e6 fix: a printed comment says which page it is anchored on
The list quoted its text but named no place, so on a five-page printout the
entry was a needle. It now leads with the page, the format LibreOffice prints
its own end-of-document comments in. Only the raster paths can say it — they
print the editor's own pagination, the vector one re-paginates in the browser.

commentsHeading gives way to commentLabels, since the page needs a word too.
2026-09-04 19:30:02 +02:00
Steffen Becker 29433e1b1d feat: a switch decides whether a printout carries the review markup
The Review tab's "Print markup", on by default and stored only when off
(edentext-print-markup). Off, the raster paths drop the bar layer from the
clone and skip the comment pages, the vector path emits neither the markup CSS
nor the list.

printPdf rebuilds its options field by field, so it never saw commentsHeading
either — the printed list was headed in English whatever the UI language.
2026-09-04 19:30:02 +02:00
Steffen Becker 2aecb1a1b3 feat: a printed document carries its comments and changes
The bar in the margin beside every changed or commented block, and the comment
bodies as a list after the document — a comment's text is nowhere on the page,
so a bar alone could only say that one exists. Resolved comments print nowhere,
and a document with no markup prints exactly as before.

The print engine clips to the page area (measured), so the vector path buys the
bar's strip out of the left @page margin and gives it back as padding. The
raster paths clone the editor's own layer and append the list as whole pages.
2026-09-04 19:30:02 +02:00
Steffen Becker 060dcd7380 feat: a text box sits in the line of text
textBox becomes an inline node carrying block content, like the frame both
formats write, so "in line with text" really is in the line and a box reaches
a table cell or a list item through their paragraphs. Both exports write it
where it sits (an as-char draw:frame / a wp:inline drawing) and both imports
leave it there, which drops the hoisting machinery on either side.

Two guards the schema cannot express: no box inside a box, and a selection
reaching into a box grows to the box's bounds rather than dissolving it.
2026-09-04 19:30:01 +02:00
Steffen Becker f60a07580c fix: PDF/print export with a placeholder field selected
The selected-node highlight is color-mix(), whose computed value
serializes as a color() function html2canvas cannot parse — the whole
capture aborted. The export clone now strips selection highlights
(which should not print anyway). Reproduced and verified headlessly.
2026-08-25 15:12:05 +00:00
Steffen Becker bb15572b57 test: smoke-check the raster-PDF export
exportPdf gains a test seam: a window.__edentextPdfSink takes the bytes
instead of doc.save(), whose download hangs in headless Chromium. The
smoke test clicks the real export menu over the imported corpus document
and asserts %PDF magic and a plausible size. The test browser is pinned
to en-US so the labels it clicks are deterministic across machines.
2026-08-15 23:18:55 +02:00
Steffen Becker 3153c2f7cc feat: the running head names the chapter the page is in
A manual's footer carries text:chapter, which we imported as the string the
producer happened to cache — so every page of a fixture claimed the last chapter
of the book. It is now a live field: the layer resolves the last heading at
or above its outline level to have started by that page. Round-trips to ODF
text:chapter and Word STYLEREF; PDF keeps the cached name (Chrome's print
engine has no named strings).
2026-08-10 13:04:25 +00:00
Steffen Becker 30b5b7890e feat: a header's page background paints behind the page it belongs to
A positioned frame in a header is out of flow — the title-page background or
watermark. It keeps its wrap and its offset from the page corner, and the
layer paints it per page under the body instead of flowing it inline, where
it reserved a page-tall line of body space.

The page surface moves from .tiptap to .paper so the image has a layer
between the sheet and the text; ODF export writes it back page-anchored.
2026-08-09 15:13:46 +00:00
Steffen Becker 63149d52d7 feat: a list marker sits at the level's hanging indent
CSS gives ::marker no position, so Chromium set it flush against the
text — about 4mm right of where Word and LibreOffice draw it. The marker
is now the item block's ::before, placed at the hanging indent both
exports already write (LIST_HANGING_CM 0.635cm): measured against LO's
own render, the three bullet levels land within 0.04mm.

Out of flow, because in flow it grew every list line by a pixel and cost
a fixture fixture a page. `list-style: none` drops only the marker box,
so the list-item counter and <ol start> keep numbering; a bullet's own
char rides an inherited property, since attr() in a pseudo would read the
block rather than the list.
2026-08-08 12:57:24 +00:00
Steffen Becker be96ee626c docs: apply rules for comments 2026-08-08 08:28:55 +00:00
Steffen Becker 56f884a412 feat: dropdown for text styles 2026-07-27 20:35:55 +02:00
Steffen Becker 2a7abed917 feat: odd/even variants for footer/header 2026-07-18 16:42:23 +02:00
Steffen Becker dce22ab3f4 fix: header and footer editor 2026-07-18 11:49:49 +02:00
Steffen Becker 6535d4c58d fix: page breaks, empty lines, ... 2026-07-15 22:19:49 +02:00
Steffen Becker b6556bf82a feat: add further page formats 2026-07-08 19:21:27 +00:00
Steffen Becker bbd84cbeed feat: new page formats A3, A5, letter, legal 2026-07-08 19:21:18 +00:00
Steffen Becker e44f09ef42 feat: proper ordered list cycling 2026-07-05 11:51:07 +02:00
Steffen Becker d018092cce feat: improve ordered list 2026-07-04 21:45:05 +02:00
Steffen Becker 3b7e7606bb feat: bullet symbols 2026-07-04 17:14:54 +02:00
Steffen Becker dc1352b9cd fix: print raster instead of vector pdf 2026-06-28 16:18:34 +02:00
Steffen Becker 09e517f774 fix: add manual pagebreak to vector pdf 2026-06-27 11:09:26 +02:00
Steffen Becker 32c33c9db3 fix: missing empty lines in prints 2026-06-25 19:41:26 +02:00
Steffen Becker 8acae13b9a refactor: organize lib/editor 2026-06-24 23:34:24 +02:00
Steffen Becker 798af26456 fix: pdf image list export 2026-06-24 22:48:10 +02:00
Steffen Becker 20eb94d7c0 docs: clean up comments 2026-06-21 12:29:25 +02:00
Steffen Becker d9d3ddb724 feat: add document name 2026-06-18 23:32:16 +02:00
Steffen Becker fb2ce271fa feat: raster pdf and vector pdf(beta) 2026-06-18 22:24:07 +02:00
Steffen Becker 2526144ab9 feat: add pdf-export 2026-06-17 21:07:20 +02:00