You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Set paragraph alignment on the target block(s). Can be combined with inline formatting in the same step.',
4880
4880
},
4881
+
scope: {
4882
+
type: 'string',
4883
+
enum: ['match','block'],
4884
+
description:
4885
+
'When "block", inline formatting expands to cover the entire parent paragraph(s), not just the matched text. Use "block" after markdown inserts to format whole paragraphs with a short identifying pattern. Default: "match".',
4886
+
},
4881
4887
},
4882
-
[],// Neither field is individually required — at least one must be present
4888
+
[],// No individual field is required — at least one must be present
value: "# Executive Summary\n\nThis agreement sets forth the principal terms..."})
147
147
```
148
148
149
-
**Step 3: Apply ALL formatting in a SINGLE superdoc_mutations call.** Each format.apply step accepts both `inline` (text styles) AND `alignment` (paragraph alignment) — one step per block.
149
+
**Step 3: Apply ALL formatting in a SINGLE superdoc_mutations call.** Each format.apply step accepts `inline` (text styles), `alignment` (paragraph alignment), and `scope` — combine them all in one step per block.
150
+
151
+
ALWAYS use `scope: "block"` after markdown inserts. This makes the formatting cover the entire paragraph, not just the matched text pattern. The pattern only needs to uniquely identify which paragraph — a short prefix is enough.
150
152
151
153
Example: if the document has centered, underlined, 12pt headings and justified 12pt body text:
CRITICAL: Do NOT guess formatting values. Copy them from the existing document blocks you read in step 1. Use ONE format.apply step per block with both `inline` and `alignment` combined.
161
+
CRITICAL: Do NOT guess formatting values. Copy them from the existing document blocks you read in step 1. Use `scope: "block"` so the formatting covers the ENTIRE paragraph, not just the matched text.
160
162
161
163
Total: 3 calls (read + insert + format-all-in-one-batch). Never more.
One format.apply step per block. Combine `inline` (text styles) and `alignment` (paragraph alignment) in the same step. Do NOT use separate superdoc_format calls.
40
+
One format.apply step per block. Combine `inline`, `alignment`, and `scope: "block"` in each step. The pattern only needs to identify which paragraph — `scope: "block"` formats the entire paragraph, not just the matched text.
41
41
42
42
**When to use which tool:**
43
43
- Creating headings, paragraphs, or any block content → `superdoc_edit` with type "markdown" (preferred, even for a single heading + paragraph)
0 commit comments