SetTemplateType

function SetTemplateType(
  sType: none | bullet | 1) | 1. | I. | A. | a) | a. | i. = null,
  sSymbol: string = "",
): void

Description

Sets one of the existing predefined numbering templates.

Parameters

sTypenone | bullet | 1) | 1. | I. | A. | a) | a. | i.default: null

The predefined numbering template.

sSymbolstringdefault: ""

The symbol used for the list numbering. This parameter has the meaning only if the predefined numbering template is "bullet".

Returns

void

Try It

var oDocument = Api.GetDocument();
var oNumbering = oDocument.CreateNumbering("numbered");
var oNumLvl = oNumbering.GetLevel(0);
oNumLvl.SetTemplateType("A.");
var oParagraph = oDocument.GetElement(0);
oParagraph.SetNumbering(oNumLvl);
oParagraph.AddText("This is the first element of an A.-B.-C. numbered list");
oParagraph = Api.CreateParagraph();
oParagraph.SetNumbering(oNumLvl);
oParagraph.AddText("This is the second element of an A.-B.-C. numbered list");
oDocument.Push(oParagraph);
oParagraph = Api.CreateParagraph();
oParagraph.SetNumbering(oNumLvl);
oParagraph.AddText("This is the third element of an A.-B.-C. numbered list");
oDocument.Push(oParagraph);

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).