---
title: "ApplyListTypeCmd | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ApplyListTypeCmd/"
---

# ApplyListTypeCmd

> The command to apply list type to list items by paragraph indexes.

## Classes

### ApplyListTypeCmd

#### Remarks

if paragraphs indexes are not specified, then the current selection (or cursor position) is used.

#### Implements

- [`ICommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommand.md#icommand)

#### Constructors

##### Constructor

```ts
new ApplyListTypeCmd(textManager, initData): ApplyListTypeCmd;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `textManager` | [`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager) |
| `initData` | [`ApplyListTypeCmdData`](#applylisttypecmddata) |

###### Returns

[`ApplyListTypeCmd`](#applylisttypecmd)

#### Methods

##### execute()

```ts
execute(): boolean;
```

Executes the command.

###### Returns

`boolean`

true if changes were made, false otherwise.

###### Implementation of

[`ICommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommand.md#icommand).[`execute`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommand.md#execute)

***

### ApplyListTypeCmdData

Data required to initialize the command.

#### Constructors

##### Constructor

```ts
new ApplyListTypeCmdData(): ApplyListTypeCmdData;
```

###### Returns

[`ApplyListTypeCmdData`](#applylisttypecmddata)

#### Properties

##### listType

```ts
listType: ListType;
```

List type.

##### paragraphIndexes?

```ts
optional paragraphIndexes?: number[];
```

Indexes of paragraphs to apply list type to list items.
