Live footnote API
Insert and inspect document footnotes
Add supporting information without interrupting the main text, then follow the live connection between its reference mark and note at the bottom of the page.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Reference marks and page-bottom notes form one object
A footnote lets the main text stay readable while citations, legal qualifications, or supporting detail remain attached to an exact document position. TX Text Control keeps the reference mark and its note synchronized as text is edited and repaginated.
Footnote collection
TXTextControl.footnotes
Insertion
FootnoteCollection.add
Reference events
footnoteReferenceMarkEntered / footnoteReferenceMarkLeft
Navigation
Footnote.edit / scrollTo
How it works
FootnoteCollection.add inserts a reference mark at the current input position and creates the corresponding note at the bottom of the page. Its callback returns both an added flag and the new Footnote object.
A Footnote has two identities. getNumber returns its position-dependent number in the document's text flow, while getName and getID expose stable application metadata. Moving paragraphs can therefore renumber notes without breaking application references.
getReferenceMarkStart and getReferenceMarkLength describe the one-based range of the marker in the main text. The footnoteReferenceMarkEntered and footnoteReferenceMarkLeft events keep the inspector synchronized without repeatedly scanning the selection.
Footnote.edit activates the footnote text part and moves the caret to the end of the note. Collection-wide setStartNumber and setNumberFormat update every reference and note mark consistently.
TXTextControl.footnotes.add(
"Supporting information shown at the bottom of the page.",
"supporting-context",
100,
result => {
if (result.added) {
result.footnote.edit();
}
},
showFootnoteError);
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0