@docx-editor.dev/editor-api 2.23.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +1 -10
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -126,22 +126,13 @@ Use the `/browser` entry for an open editor. Use the root entry on servers to ex
126
126
 
127
127
  Supply `author` for comments, replies, and tracked edits. Browser review writes also require the Pro review module and an editable document. Handle errors by `code`. See [Comments](https://www.docx-editor.dev/docs/2.x/editor-api/comments) and [Tracked changes](https://www.docx-editor.dev/docs/2.x/editor-api/revisions) for supported operations.
128
128
 
129
- ## Resolve revisions in a batch
130
-
131
- Use `RevisionCollection.resolve('accept')` or `resolve('reject')` to process supported changes in one story. To select changes, pass revision objects as the second argument. API batches don't inherit editor filters. Read `result.value` after `context.sync()` for resolved and skipped decisions and the remaining count.
132
-
133
- To require every change in the story to resolve, use `acceptAll()` or `rejectAll()`. These methods fail if any revision is unsupported. See [Resolve a batch of changes](https://www.docx-editor.dev/docs/2.x/editor-api/revisions#resolve-a-batch-of-changes) for examples and result handling.
134
-
135
- ## Range snapshots
136
-
137
- Ranges retain the paragraph offsets where they were found. They do not follow later text edits inside those paragraphs, even when their proxies are tracked. After editing a paragraph, search again before acting on another target there. Use the range returned by `insertText()` after sync to address its inserted text. See [Text and ranges](https://www.docx-editor.dev/docs/2.x/editor-api/text-and-ranges) for snapshot and same-batch editing limits.
138
-
139
129
  ## Programming model
140
130
 
141
131
  - Load properties before reading them. Load collection `items` before item properties.
142
132
  - Batch independent writes with `sync()`. A failed batch applies no writes; earlier successful syncs remain committed.
143
133
  - Sync after insertion before using the returned object.
144
134
  - Keep proxies inside `runtime.run()`, or explicitly track and adopt them across runs.
135
+ - Search again after editing a paragraph. Existing ranges retain their original offsets.
145
136
  - Check `isNullObject` after sync when using a null-object accessor.
146
137
  - Check nullable font values and review dates before using them.
147
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docx-editor.dev/editor-api",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "Document automation for DOCX: a batching object model that drives a document from a server or from an editor already open in a page",
5
5
  "sideEffects": false,
6
6
  "engines": {
@@ -82,6 +82,6 @@
82
82
  "access": "public"
83
83
  },
84
84
  "peerDependencies": {
85
- "@docx-editor.dev/core": "~2.23.0"
85
+ "@docx-editor.dev/core": "~2.24.0"
86
86
  }
87
87
  }