# AttributeStrategy

interface

Strategy for dealing with `listItem` attributes supported by this plugin.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L240)

<a id="properties">

## Properties

<a id="member-attributeName">

### `attributeName: keyof ListItemAttributesMap`

The model attribute name.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L245)

<a id="member-defaultValue">

### `defaultValue: unknown`

The model attribute default value.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L250)

<a id="member-viewConsumables">

### `viewConsumables: Consumables`

The view consumable as expected by [`ViewConsumable`](module_engine_conversion_viewconsumable-ViewConsumable.md#function-consume).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L255)

<a id="methods">

## Methods

<a id="function-addCommand">

### `addCommand( editor ) → void`

Registers an editor command.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L260)

#### Parameters

* `editor: Editor`

#### Returns

* `void`

<a id="function-appliesToListItem">

### `appliesToListItem( element ) → boolean`

Verifies whether the strategy is applicable for the specified model element.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L265)

#### Parameters

* `element: ModelItem`

#### Returns

* `boolean`

<a id="function-getAttributeOnUpcast">

### `getAttributeOnUpcast( element ) → unknown`

Retrieves the property value from the view element.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L280)

#### Parameters

* `element: ViewElement`

#### Returns

* `unknown`

<a id="function-hasValidAttribute">

### `hasValidAttribute( element ) → boolean`

Verifies whether the model attribute value is valid.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L270)

#### Parameters

* `element: ModelElement`

#### Returns

* `boolean`

<a id="function-setAttributeOnDowncast">

### `setAttributeOnDowncast( writer, value, element ) → void`

Sets the property on the view element.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/listproperties/listpropertiesediting.ts#L275)

#### Parameters

* `writer: ViewDowncastWriter`
* `value: unknown`
* `element: ViewElement`

#### Returns

* `void`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
