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
'IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE superdoc_mutations call to format inserted blocks so they look like they belong. '+
152
152
'Each format.apply step accepts "inline" (fontFamily, fontSize, bold, underline, color), "alignment", and "scope" in the same step. '+
153
153
'Use scope: "block" so formatting covers the entire paragraph. '+
154
-
'ONLY set inline properties that are explicitly shown in the existing get_content blocks. If blocks do not show fontSize, do NOT set fontSize (it inherits the document default). Do NOT invent values — mirror exactly what the document blocks show. '+
154
+
'Copy the exact property values from the existing get_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values — use what the blocks show. '+
155
155
'Also supports replace, delete, and undo/redo. For replace and delete, pass a "ref" from superdoc_search or superdoc_get_content blocks. '+
156
156
'A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. '+
157
157
'Refs expire after any mutation; always re-search before the next edit. '+
**Step 3: Format ALL inserted blocks in ONE superdoc_mutations call.** Each format.apply step accepts `inline`, `alignment`, and `scope: "block"`.
153
153
154
-
Use `scope: "block"` so the formatting covers the entire paragraph (not just the matched text). The text pattern only needs to identify which block.
154
+
Use `scope: "block"` so formatting covers the entire paragraph (not just the matched text). The text pattern only needs to identify which block. Copy the exact property values from the existing blocks in the get_content response. Do NOT invent values.
155
155
156
-
ONLY include inline properties that are explicitly present in the existing blocks. If the document blocks don't show `fontSize`, do NOT set fontSize (it will inherit the document's default, which is correct). If they don't show `bold`, don't set bold. Mirror exactly what you see, nothing more. Inventing values (like assuming fontSize: 12) causes mismatches.
157
-
158
-
Example: document blocks show fontFamily and color but NO fontSize, titles are centered:
0 commit comments