跳到主要内容

SetReadingOrder

Specifies the reading order for the current paragraph. Possible values are: -null - use the standart direction parameter; -"ltr" - left-to-right text direction; -"rtl" - right-to-left text direction.

Syntax

expression.SetReadingOrder(readingOrder);

expression - A variable that represents a ApiParagraph class.

Parameters

NameRequired/OptionalData typeDefaultDescription
readingOrderOptionalReadingOrderThe reading order.

Returns

ApiParagraph

Example

This example shows how to set the reading order of the text in the specified paragraph.

const doc = Api.GetDocument();
const paragraph = Api.CreateParagraph();
paragraph.AddText('Hello! مرحبا! 你好!');
doc.Push(paragraph);
paragraph.SetReadingOrder('rtl');