SetDefaultStyle

function SetDefaultStyle(): boolean

Description

Sets the default hyperlink style.

Returns

boolean

Try It

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("Api Document Builder");
oParagraph.SetColor(255, 111, 61);
var oCopyParagraph = oParagraph.Copy();
oDocument.Push(oCopyParagraph);
var oHyperlink = oParagraph.AddHyperlink("http://api.teamlab.info/docbuilder/basic");
var oCopyHyperlink = oCopyParagraph.AddHyperlink("http://api.teamlab.info/docbuilder/basic");
oCopyHyperlink.SetDefaultStyle();

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).