feat: textbox content editing - rendering and interaction (phase 0 and 1)#3700
Conversation
|
I've tried the ecma-spec MCP tools repeatedly (attributes, enum, children, search) and every call is being denied permission in this environment, so I couldn't run live spec lookups. I reviewed the OOXML element/attribute usage against ECMA-376 from knowledge instead. Flagging that up front for transparency. Status: PASS I went through the six handler files you listed, focusing on what XML elements/attributes they read on import and emit on export. Everything maps to real ECMA-376 / VML constructs with correct defaults. DrawingML side (
VML side (
Export wrapper (
A couple of non-blocking notes (not spec violations): the DrawingML export drops the VML If you want, I can re-run the actual ECMA-376 lookups to harden these conclusions once the |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Now that textbox content is rendered as .superdoc-line[data-pm-start], clicks on textbox text usually succeed through the DOM-first path, but this enrichment loop only recognizes para fragments. For a textbox DOM position it falls through to the default { blockId: '', pageIndex: 0, lineIndex: -1 }, so body textboxes on later pages (and drag selection/virtualization state that uses the returned page/block metadata) are attributed to page 0 instead of the textbox fragment. The DOM-success path needs to identify drawingKind === 'textboxShape' content ranges just like the geometry fallback does.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
93501a7 to
d8f5be1
Compare
|
hey @artem-harbour! I had a look, tested everything manually in the browser and it's looking good. claude/codex found a few things that I left as inline comments. |
90528ac to
75bf602
Compare
|
Hi @luccas-harbour, All comments were addressed. |
Main task: SD-3395
Sub-tasks (phases): SD-3402, SD-3404
Summary
This PR adds real text editing inside text boxes.
Text boxes imported from DOCX can now behave much more like normal document
content: you can click inside them, place the caret, type, delete text, and
move the caret in body content, headers/footers, and table cells.
It also improves import/export so textbox content and positioning survive
round-trip more reliably for both DrawingML and VML textboxes.
What’s included
Editable textbox content
Text inside supported text boxes is now laid out and rendered as addressable
document content rather than as a flat text blob. That makes caret placement,
click-to-position, and text editing work inside the textbox.
Better import/export round-trip
DrawingML textboxes are now imported into the same editable structure we already
use for VML textboxes, and exported back from live editor state. VML textbox
positioning is also preserved more reliably across save/reload.
Works in more contexts
Textbox editing now works not only in the main document flow, but also inside:
behindDoc=1header/footer textboxesImplementation notes
behindDoctextboxes