Delete
Removes the table of figures from the document.
note
This functionality is available in paid ONLYOFFICE Docs editions.
Syntax
expression.Delete();
expression - A variable that represents an ApiTableOfFigures class.
Parameters
This method doesn't have any parameters.
Returns
boolean
Example
Remove a table of figures from the document.
// Add a captioned figure and a table of figures built from the "Figure" label.
// Delete the table of figures together with its container.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("Figure 1");
paragraph.AddCaption(" - Sample figure", "Figure", false, "Arabic", false, undefined, "hyphen");
let tof = doc.AddTableOfFigures({"BuildFrom": "Figure", "LabelNumber": true});
tof.Delete();