Skip to content

fix(super-editor): normalize API tab insertions#2830

Draft
missysuperdoc wants to merge 2 commits intosuperdoc-dev:mainfrom
missysuperdoc:codex/sd-2567-api-tabs-export
Draft

fix(super-editor): normalize API tab insertions#2830
missysuperdoc wants to merge 2 commits intosuperdoc-dev:mainfrom
missysuperdoc:codex/sd-2567-api-tabs-export

Conversation

@missysuperdoc
Copy link
Copy Markdown
Collaborator

@missysuperdoc missysuperdoc commented Apr 15, 2026

What changed

  • normalize API text writes so literal tab characters are materialized as structured inline tab nodes instead of raw text
  • reuse the same inline-content expansion for direct writes, tracked insertions, and text execution in the document API write paths
  • add regression coverage for direct writes, tracked changes, and exported DOCX XML in both direct and tracked adapter flows

Why this changed

API-driven insertions were preserving \t inside text nodes, which exported to raw tab characters inside <w:t> instead of proper <w:tab/> runs.

Impact

API insertions now match the editor's native tab model, and DOCX export emits valid Word tab runs for both direct and tracked document API writes.

Validation

  • pnpm --prefix packages/super-editor exec vitest run src/editors/v1/document-api-adapters/write-adapter.test.ts
  • pnpm --prefix packages/super-editor exec vitest run src/editors/v1/extensions/track-changes/track-changes-extension.test.js
  • pnpm --prefix packages/super-editor exec vitest run src/editors/v1/document-api-adapters/write-tabs-export.integration.test.ts

@missysuperdoc missysuperdoc changed the title [codex] Normalize API tab insertions fix(super-editor): normalize API tab insertions Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant