Skip to main content

GetInternalId

Returns an internal ID of the current content paragraph.

Syntax

expression.GetInternalId();

expression - A variable that represents a ApiParagraph class.

Parameters

This method doesn't have any parameters.

Returns

string

Example

This example shows how to get the internal ID of a paragraph.

const doc = Api.GetDocument();
const paragraph = doc.GetElement(0);
paragraph.AddText('This is a sample paragraph.');

const internalId = paragraph.GetInternalId();
const paragraph2 = Api.CreateParagraph();
paragraph2.AddText('First paragraph internal ID: ' + internalId);
doc.Push(paragraph2);