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.
This commit is contained in:
Steffen Becker committed 2026-09-04 19:30:01 +02:00
1 parent 21999afbc6
commit 060dcd7380
29 files changed
+700 -345

No files matched your search

+1 -8
View File
@@ -488,11 +488,6 @@
shared image-* handles; .textbox-content is the editable area. */
.paper .tiptap .textbox-node {
position: relative;
/* The anchor paragraph's space above, as padding so it adds to the block above
rather than collapsing against it (textBox.ts, storage/spacingModel.ts). The
inline height is the frame's, so the padding has to sit outside it. */
box-sizing: content-box;
padding-top: var(--space-before);
}
.paper .tiptap .textbox-node.textbox-selected,
.paper .tiptap .textbox-node.textbox-active {
@@ -501,9 +496,7 @@
.paper .tiptap .textbox-rotor {
position: absolute;
left: 50%;
/* Centred in the padding box, so half the space above has to come back to keep the
frame itself below it — the *applied* space, which a page top drops. */
top: calc(50% + var(--space-top, 0px) / 2);
top: 50%;
box-sizing: border-box;
transform: translate(-50%, -50%);
}