Native Word SDT (w:sdt) fields for documents. Supports inline and block structured content tags for dynamic templates with full Word compatibility.Documentation Index
Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Use case
- Form templates — Create fillable documents with inline text fields and block content areas
- Contract generation — Dynamic clauses and terms that map to Word content controls
- Document automation — Programmatically update specific sections while preserving structure
- Protected fields — Lock modes control which fields users can edit or delete (ECMA-376
w:lock)
Quick start
Options
Configure the extension behavior:CSS class for the block
HTML attributes for structured content blocks
Attributes
Node attributes that can be set and retrieved:Unique identifier for the structured content block
The
id attribute must be a numeric string for valid DOCX output (per
ECMA-376
§17.5.2.18).
Use Date.now().toString() or sequential integers instead of UUIDs.Content control tag (e.g., ‘block_table_sdt’)
Display name for the block
Controls editing and deletion restrictions on the structured content node. See Lock modes below.
Lock modes
Structured content nodes support four lock modes based on the OOXMLw:lock element (ISO/IEC 29500 §17.5.2.23). Lock modes control whether users can edit the content inside a field and whether they can delete the field wrapper itself.
| Lock mode | Wrapper | Content | Use case |
|---|---|---|---|
unlocked | Deletable | Editable | Default — no restrictions |
sdtLocked | Protected | Editable | Protect field structure, allow value changes |
contentLocked | Deletable | Read-only | Display a computed value users can remove |
sdtContentLocked | Protected | Read-only | Fully protected field (e.g., system-generated ID) |
Lock modes round-trip through DOCX. A document with
w:lock elements in
its SDT properties will import with the correct lock mode and export the
w:lock element back to the saved file.Commands
insertStructuredContentInline
Inserts a structured content inline at the current selection.
Example:
insertStructuredContentBlock
Inserts a structured content block at the current selection.
Example:
updateStructuredContentById
Updates a single structured content field by its unique ID.
IDs are unique identifiers, so this will update at most one field.
If the updated node does not match the schema, it will not be updated.
Pass attrs alone to change attributes (like lockMode) without replacing content:
Example:
Unique identifier of the field
deleteStructuredContent
Removes a structured content.
Parameters:
deleteStructuredContentById
Removes a structured content by ID.
Parameters:
deleteStructuredContentAtSelection
Removes a structured content at cursor, preserving its content.
updateStructuredContentByGroup
Update all structured content fields that share the same group identifier.
Example:
Group identifier to match
Update options (same as
updateStructuredContentById)deleteStructuredContentByGroup
Remove all structured content fields that share the same group identifier.
Example:
Group identifier or array of group identifiers
appendRowsToStructuredContentTable
Append multiple rows to the end of a table inside a structured content block.
Each inner array represents the cell values for one new row.
Example:
Append configuration
Helpers
getStructuredContentBlockTags
Get all block-level structured content tags in the document
Example:
getStructuredContentInlineTags
Get all inline structured content tags in the document
Example:
getStructuredContentTablesById
Find all tables inside a structured content block by ID
Example:
Structured content block ID
getStructuredContentByGroup
Find all structured content nodes that share the same group identifier.
Example:
Group identifier or array of group identifiers
getStructuredContentTags
Get all structured content tags (inline and block) in the document
Example:
getStructuredContentTagsById
Get structured content tag(s) by ID
Example:
Single ID or array of IDs to find

