- Insert footnotes
- Insert endnotes
- Update or edit footnotes and endnotes
Contact Support
Notes in EJ2 JavaScript Document editor control
26 Nov 20231 minute to read
DocumentEditorContainer component provides support for inserting footnotes and endnotes through the in-built toolbar. Refer to the following screenshot.
The Footnotes and endnotes are both ways of adding extra bits of information to your writing outside of the main text. You can use footnotes and endnotes to add side comments to your work or to place other publications like books, articles, or websites.
Insert footnotes
Document Editor exposes an API to insert footnotes at cursor position programmatically or can be inserted to the end of selected text.
import { DocumentEditorContainer, Toolbar } from '@syncfusion/ej2-documenteditor';
//Inject require modules.
DocumentEditorContainer.Inject(Toolbar);
let container: DocumentEditorContainer = new DocumentEditorContainer({
enableToolbar: true,
serviceUrl: 'https://services.syncfusion.com/js/production/api/documenteditor/'
});
container.appendTo('#DocumentEditor');
//Insert footnote in current selection.
container.documentEditor.editor.insertFootnote();
Insert endnotes
Document Editor exposes an API to insert endnotes at cursor position programmatically or can be inserted to the end of selected text.
import { DocumentEditorContainer, Toolbar } from '@syncfusion/ej2-documenteditor';
//Inject require modules.
DocumentEditorContainer.Inject(Toolbar);
let container: DocumentEditorContainer = new DocumentEditorContainer({
enableToolbar: true,
serviceUrl: 'https://services.syncfusion.com/js/production/api/documenteditor/'
});
container.appendTo('#DocumentEditor');
//Insert endnote in current selection.
container.documentEditor.editor.insertEndnote();
Update or edit footnotes and endnotes
You can update or edit the footnotes and endnotes using the built-in context menu shown up by right-clicking it. The footnote endnote dialog box popup and you can customize the number format and start at. Refer to the following screenshot.