1.21 release notes
RSSNutrient Document Authoring SDK 1.21 adds selection-change notifications and supports Document Authoring AI 2.0. The AI features below require the separately installed @nutrient-sdk/document-authoring-ai package at version 2.0.0 and SDK 1.21 or later.
Selection-change notifications
Subscribe to selection.change to respond when users move the caret, select text, or clear the selection. Applications can use this event to keep contextual controls and selection-dependent actions up to date. The event has no payload; read the current selection with editor.getSelectionContent() and check for an active caret with editor.hasActiveCursor().
AI workflows with smaller models
Proofreading and translation workflows now ask the model for a list of focused edits instead of a complete replacement fragment. This improves reliability with smaller models such as GPT-5.4-mini and preserves content and formatting outside the edits.
The backend uses prepareWorkflowRun() to prepare the model request and run.apply() to assemble the replacement fragment. The browser validates that fragment before applying it.
Inspect pending tracked changes
The new list_revisions AI tool lets assistants inspect pending tracked changes, including their authors and text previews. Applications can filter and limit the results. Reading revisions doesn’t accept, reject, or modify them.
AI editing fixes
- Assistants can continue editing in Review mode after the first tracked change.
- Users with the reviewer role can apply AI-suggested edits as tracked changes under their participant author name.
- Workflow input can be passed directly from
readWorkflowInput()toprepareWorkflowRun()without a JSON serialization step.
Upgrading to Document Authoring AI 2.0
AI 2.0 changes the model response format and removes the previous workflow output-schema helpers. Update the backend to use the edit-schema helpers and apply model edits through the same prepared run. The browser still receives a replacement fragment.
See the AI package migration guide(opens in a new tab) for the complete breaking changes and before-and-after examples.
For the SDK release summary, refer to the changelog.