Skip to main content

GetUseHyperlinks

Returns whether entries are formatted as hyperlinks.

note

This functionality is available in paid ONLYOFFICE Docs editions.

Syntax​

expression.GetUseHyperlinks();

expression - A variable that represents an ApiTableOfFigures class.

Parameters​

This method doesn't have any parameters.

Returns​

boolean

Example​

Check whether the table of figures entries are formatted as hyperlinks.

// Add a captioned figure and a table of figures built from the "Figure" label.

// Read whether the entries link to their target captions.

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});
let isUseHyperlinks = tof.GetUseHyperlinks();
let resultParagraph = Api.CreateParagraph();
resultParagraph.AddText("Entries use hyperlinks: " + isUseHyperlinks);
doc.Push(resultParagraph);