Back to Devexpress

RichEditCommands.changeTabs Property

aspnet-js-richeditcommands-9fa33cef.md

latest1.8 KB
Original Source

RichEditCommands.changeTabs Property

Gets a command to change the default tab stop value of a document and apply custom tab settings to the selected paragraphs.

Declaration

ts
get changeTabs(): ChangeTabsCommand

Property Value

TypeDescription
ChangeTabsCommand

An object that provides methods that execute the command and check its state.

|

Remarks

Call the execute(settings) method to invoke the command. The method checks the command state (obtained via the getState method) to determine whether the action can be performed.

The command includes size parameters assigned in twips. Use the ASPxClientRichEdit.unitConverter to convert size measure units (inches, points, pixels, centimeters) to twips.

Usage example:

javascript
var tabSettings = {
    defaultTabStop: richEdit.unitConverter.pixelsToTwips(40),
    tabs: [{
        alignment: ASPx.TabAlign.Center,
        leader: ASPx.TabLeaderType.ThickLine,
        position: richEdit.unitConverter.pixelsToTwips(90),
        deleted: false
    }, {
        alignment: ASPx.TabAlign.Right,
        leader: ASPx.TabLeaderType.EqualSign,
        position: richEdit.unitConverter.pixelsToTwips(200),
        deleted: false
    }]
};

richEdit.commands.changeTabs.execute(tabSettings);

Refer to the following section for more information: Client Commands.

See Also

RichEditCommands Class

RichEditCommands Members