CreateNumbering

function CreateNumbering(sType: BulletType = null, nStartAt: number = null): ApiBullet

Description

Creates a bullet for a paragraph with the numbering character or symbol specified with the sType parameter.

Parameters

sTypeBulletTypedefault: null

The numbering type the paragraphs will be numbered with.

nStartAtnumberdefault: null

The number the first numbered paragraph will start with.

Returns

ApiBullet

Try It

var oDocument = Api.GetDocument();
var oNumbering = oDocument.CreateNumbering("bullet");
for (let nLvl = 0; nLvl < 2; ++nLvl) {
   var oNumLvl = oNumbering.GetLevel(nLvl);
   var oParagraph = Api.CreateParagraph();
   oParagraph.AddText("This is an example of the bulleted paragraph № " + (nLvl + 1));
   oParagraph.SetNumbering(oNumLvl);
   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).