feat(document-api): support wrapping text ranges via contentControls.create (SD-2566)#2815
Conversation
…create (SD-2566) Add optional `at` field (SelectionTarget) to CreateContentControlInput, enabling callers to wrap arbitrary text ranges in content controls without dropping down to editor internals. Mutually exclusive with the existing `target` field.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15f03fece8
ℹ️ 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".
packages/document-api/src/content-controls/content-controls.types.ts
Outdated
Show resolved
Hide resolved
… at field - Re-acquire editor command after at selection dispatch to avoid stale state bug (CommandService captures state at access time) - Reorder validation so at/target mutual exclusivity check runs before target shape validation for clearer error messages - Document at + content interaction in JSDoc - Extract shared validAt constant in tests
The objectSchema uses additionalProperties: false, so contract-driven callers (CLI, SDK) would reject payloads with the new at field.
…ng-text-ranges-in-content
|
🎉 This PR is included in vscode-ext v2.3.0-next.16 |
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.13 The release is available on GitHub release |
|
🎉 This PR is included in esign v2.3.0-next.16 The release is available on GitHub release |
|
🎉 This PR is included in template-builder v1.5.0-next.16 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.26.0-next.16 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.7.0-next.17 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.6.0-next.14 |
Add optional
atfield (SelectionTarget) toCreateContentControlInput, enabling callers to wrap arbitrary text ranges in content controls without dropping down to editor internals.at?: SelectionTargettoCreateContentControlInput— mutually exclusive withtargetisSelectionTargetguardSelectionTarget→ PM positions viaresolveSelectionTarget, setTextSelection, then delegate toinsertStructuredContentInline/BlockCloses SD-2566