Endnote
Endnote:
{}Represents an endnote element within document content.
Remarks
Section titled “Remarks”Endnote is an inline element that contains an endnote reference mark in the main text
and associated content that appears at the end of the document or section. Endnotes are
similar to footnotes but collected at the end rather than at the bottom of each page.
The endnote contains block-level content (paragraphs, tables) accessed via the content()
method. Endnotes are discovered by iterating through inline elements and checking their
type discriminator.
Example
Section titled “Example”Find and list all endnotes:
const inlines = textView.inlines();for (const rangeInline of inlines) { if (rangeInline.inline.type === 'endnote') { const endnoteContent = rangeInline.inline.content(); const text = endnoteContent.blocklevels() .map(bl => bl.type === 'paragraph' ? bl.asTextView().getPlainText() : '') .join(' '); console.log('Endnote text:', text); }}Properties
Section titled “Properties”type:
"endnote"
Type discriminator for inline elements.
Remarks
Section titled “Remarks”Always has the value 'endnote'. Use this property to narrow the inline element
type and access endnote-specific methods.
Methods
Section titled “Methods”content()
Section titled “content()”content():
BlockLevelContainer
Gets the block-level content container for this endnote.
Returns
Section titled “Returns”A BlockLevelContainer containing the endnote’s paragraphs and tables
Remarks
Section titled “Remarks”Returns a container that holds the actual content of the endnote (what appears at
the end of the document or section). You can use this to read, modify, add, or remove
content within the endnote using the standard BlockLevelContainer methods.
Example
Section titled “Example”if (inline.type === 'endnote') { const content = inline.content(); const paragraphs = content.blocklevels(); console.log(`Endnote has ${paragraphs.length} paragraphs`);}