Citation types
Pilot programAlpha
Look up the fields stored with a citation and returned in a citation snapshot.
| Fields | Type and meaning |
|---|---|
id, sourceId | String IDs for the citation and its source. |
kind | 'inline' | 'node'. How the citation attaches to the document. |
text, confirmedText | Current and confirmed text. |
confirmedReviewText | Optional string | null. Approved inline comparison text with hard breaks when it differs from confirmedText. |
nodeAttributes | Optional CitationNodeAttributes, a read-only snapshot of the cited node's current JSON attributes. |
source, sourceRevision | Current SourceSnapshot and revision string. A missing source yields undefined and null, respectively. |
confirmedSourceRevision | Confirmed revision string. |
status, invalidReasons | 'valid' | 'invalid' and a read-only array of invalid reasons. |
ranges | Read-only CitationRange objects with numeric ProseMirror positions from and to. A node citation's range covers the whole node. |
createdBy, updatedBy, lastApprovedBy | Read-only CitationUser objects. The last approver is null before explicit approval. |
createdAt, updatedAt, lastApprovedAt | UTC ISO timestamps. The last approval time is null before explicit approval. |
CitationAttributes covers the IDs, confirmed text, optional confirmedReviewText, confirmed source revision, and attribution stored in the document. A snapshot groups all surviving ranges for the same ID. See the text review rule for the strings passed to the callback.
Inline citations require nonempty confirmed text. For a node such as an image, the confirmed text can be empty. When importing HTML, Smart Citations drops invalid citation marks and preserves their text.