GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.superdoc.dev — Document API mental model | SuperDoc The Document API is the operation contract for reading and changing a SuperDoc document. Browser and headless hosts expose the same operation names and data shapes. Most workflows follow four steps:
1. QueryUse Follow Query document content for a complete browser example and the result fields to keep. Do not derive mutation locations from rendered DOM nodes or copied text offsets. The DOM can change when layout changes. A Document API result belongs to the document model. 2. Address or targetAn address identifies a document location or object. A target describes the content a mutation should affect. Some query results provide a mutation-ready target. Other workflows resolve an address into the target required by the operation. Keep the target returned for the current document revision. If the document changes first, query again instead of assuming that an old target still points to the same content. In the V2 runtime, 3. MutatePass the target to the operation that makes the change. The target makes the scope explicit. It also lets each host apply the same operation contract without inspecting its UI state. Tracked-change review follows this shape. 4. ReceiptA successful mutation returns a receipt that records what the engine applied. Use it to confirm the result and continue from the resolved effects. Treat the receipt as part of the contract. Do not infer success from a repaint, a changed file size, or the absence of an error.
Runtime shapeBrowser calls are Promise-shaped. Other clients expose their own synchronous or asynchronous form. The operation names, inputs, outputs, targets, errors, and receipt meaning stay the same. This separation is deliberate. The host decides how a call runs. The Document API decides what the call means. Group a logical action for UndoUse Each write publishes as it completes and keeps its normal permission, lock, revision, and receipt checks. A failed write leaves the successful prefix undoable; grouping does not roll it back. An empty group adds no history entry. Nested groups, history-unsafe writes, and overlapping temporary mutations are rejected. Undo, Redo, and native user edits finish the open group. A later Use the contract in a workflowMount an editorOpen a DOCX, make a tracked edit, and export the result in a browser application. Run a headless operationQuery a DOCX, accept its tracked changes, and save a separate output from Node.js. Connect code to human reviewCreate a tracked replacement, review the exact output in the editor, and export the decision. ReferenceThe generated Document API reference is derived from the canonical public contract and lists the current operations, inputs, outputs, and failure modes. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |