Cite nodes
Attach sources to whole nodes and navigate to node citations.
Node citations attach a source to a whole node, such as an image or a paragraph.
Try an image citation
Select the image and click Add Citation. Edit the Field photo source, then click Apply source change to flag the image citation for review.
Cite a node in code
Use createCitation with a node selection to cite the whole node. In the install example, position 0 is immediately before the first paragraph.
editor.chain().setNodeSelection(0).createCitation({ sourceId: 'manual' }).run()To cite that paragraph without changing the selection, pass its position directly.
editor.commands.createCitation({ sourceId: 'manual', position: 0 })A node can carry several citations. Queries return kind: 'node' and a range that covers the node. Use setNodeSelection(range.from) to navigate to it. Use setTextSelection(range) for kind: 'inline'.
Node citations need review when their source changes or goes missing. Edits to the node update attribution, including changes to its text or attributes. Metadata from Smart Citations, Comments, and Tracked Changes does not count as an edit. Custom nodes must render the supplied HTML attributes to preserve citations in HTML exports.