JSON API - addStructuredDocumentTag

addStructuredDocumentTag

PREMIUM TRIAL / ADVANCED

Inserts Structured Document Tags.

Note

You are reading the JSON API documentation. For the PHP API method please go to addStructuredDocumentTag.

JSON data

Styles from addText can be used.

Key Description
type
  • checkbox
  • comboBox
  • date
  • dropdownList
  • richText
  • text
alias The label that will be shown in the structured document tag.
calendar Calendar type. Default type is gregorian. Possible values include: gregorian, hijri, hebrew, taiwan, japan, thai, korea, saka, gregorianXlitEnglish, gregorianXlitFrench.
checked Set checkboxes as checked or unchecked.
checkedState
  • "font": MS Gothic as default.
  • "value": 2612 as default for checkedState. 2610 as default for uncheckedState.
dateFormat The default date format is M/d/yyyy. See addDateAndHour for available date formats.
listItems An array of arrays each one of them containing the text to show and value.
local ISO code. The default value is en-US.
lock Locking properties:
  • "sdtLocked" (cannot be deleted).
  • "contentLocked" (contents can not be edited directly).
  • "unlocked" (default value: no locking).
  • "sdtContentLocked" (contents can not be directyly edited or the structured tag removed).
parseLineBreaks If true parses the line breaks to include them in the Word document: richText and text types. Default as false.
placeholderText Text to be shown by default.
sym Custom symbol used with checkbox. Use with checkedState and uncheckedState options.
  • "font"
  • "char"
tag A programmatic tag.
temporary If true the structured tag is removed after editing.
text Add text content without adding a placeholder: richText and text types.
uncheckedState
  • "font": MS Gothic as default.
  • "value": 2612 as default for checkedState. 2610 as default for uncheckedState.
wordfragment Add WordFragment content without adding a placeholder: richText type.
Code samples

Example #1

Release notes
  • phpdocx 18.0:
    • new action.