Document API
The document configuration API enables adding actions/badges to your studio, setting defaults for new documents, and defining a URL resolver.
Properties
actionsarray | DocumentActionComponent[]
Accepts an array of document action components, or a callback function that resolves to the same. The callback function receives the existing actions array as its first argument and a context object as its second. Read more about document actions.
badgesarray | DocumentBadgeComponent[]
Accepts an array of document badge components, or a callback function that resolves to the same. The callback function receives the existing badges array as its first argument and a context object as its second. Read more about document badges.
productionUrlstring | function
Constructs a production URL for previews or other purposes. Accepts a static string or a more helpful callback function called with the existing value as the first argument and a context object as the second.
If specified, an "Open preview" option in the document context menu of your studio.
newDocumentOptionsfunction | NewDocumentOptionsResolver
Accepts a callback function that returns an array of new document options templates. The callback is called with the array of existing templates and a context object as arguments. Read more about new document options.
draftsobject
Accepts an object of options. The only available option at this time is
enabled
.true
by default, settingenabled
tofalse
disables draft creation for the Studio. If the dataset already contains drafts, a banner will appear on each draft document in Studio allowing users to compare, publish, or discard the draft. For example:document: { drafts: { enabled: false } }
Was this page helpful?