# list/list/converters

module

<a id="functions">

## Functions

<a id="function-bogusParagraphCreator">

### `bogusParagraphCreator( attributeNames, __namedParameters = { __namedParameters.dataPipeline? } ) → DowncastElementCreatorFunction` _(internal)_

Returns the bogus paragraph view element creator. A bogus paragraph is used if a list item contains only a single block or nested list.

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

#### Parameters

* `attributeNames: Array<string>`

  The list of all model list attributes (including registered strategies).

* `__namedParameters: object`

  Properties

  * `__namedParameters.dataPipeline?: boolean`

  Defaults to `{}`

#### Returns

* `DowncastElementCreatorFunction`

<a id="function-createModelToViewPositionMapper">

### `createModelToViewPositionMapper( strategies, view ) → GetCallback<MapperModelToViewPositionEvent>` _(internal)_

The model to view custom position mapping for cases when marker is injected at the beginning of a block.

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

#### Parameters

* `strategies: Array<ListDowncastStrategy>`
* `view: EditingView`

#### Returns

* `GetCallback<MapperModelToViewPositionEvent>`

<a id="function-findMappedViewElement">

### `findMappedViewElement( element, mapper, model, writer ) → ViewElement | undefined` _(internal)_

Helper for mapping mode to view elements. It's using positions mapping instead of mapper.toViewElement( element ) to find outermost view element. This is for cases when mapping is using inner view element like in the code blocks (pre > code).

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

#### Parameters

* `element: ModelElement`

  The model element.

* `mapper: Mapper`

  The mapper instance.

* `model: Model`

  The model.

* `writer: ViewDowncastWriter`

  The view downcast writer.

#### Returns

* `ViewElement | undefined`

<a id="function-listItemDowncastConverter">

### `listItemDowncastConverter( attributeNames, strategies, model, __namedParameters = { __namedParameters.dataPipeline?, __namedParameters.enableSkipLevelLists? } ) → GetCallback<DowncastAttributeEvent<ListElement>>` _(internal)_

Returns the list item downcast converter.

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

#### Parameters

* `attributeNames: Array<string>`

  A list of attribute names that should be converted if they are set.

* `strategies: Array<ListDowncastStrategy>`

  The strategies.

* `model: Model`

  The model.

* `__namedParameters: object`

  Properties

  * `__namedParameters.dataPipeline?: boolean`
  * `__namedParameters.enableSkipLevelLists?: boolean`

#### Returns

* `GetCallback<DowncastAttributeEvent<ListElement>>`

<a id="function-listItemDowncastRemoveConverter">

### `listItemDowncastRemoveConverter( schema ) → GetCallback<DowncastRemoveEvent>` _(internal)_

The 'remove' downcast converter for custom markers.

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

#### Parameters

* `schema: ModelSchema`

#### Returns

* `GetCallback<DowncastRemoveEvent>`

<a id="function-listItemSkipLevelConsumer">

### `listItemSkipLevelConsumer() → GetCallback<UpcastElementEvent>` _(internal)_

Returns a consuming upcast converter for skip-level list item wrappers. It detects intermediate `<li>` elements with `list-style-type:none` (generated by the skip-level downcast or by external sources) and consumes them without producing a model element, so they don't end up as empty list items in the model.

The wrapper `<li>` is consumed, but its children (nested lists) are converted normally. Because `getIndent()` counts all ancestor `<li>` elements (including the consumed wrapper), nested items receive the correct indent values that reflect the skip-level gap.

Only `<li>` elements whose sole meaningful content is a nested `<ul>`/`<ol>` are treated as intermediate wrappers. Anything else (text, paragraphs, custom elements, even an empty `<li>` with `list-style-type:none` carrying only attributes) falls through to the regular list item upcast, so its data and attributes can be preserved by GHS or other plugins.

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

#### Returns

* `GetCallback<UpcastElementEvent>`

<a id="function-listItemUpcastConverter">

### `listItemUpcastConverter() → GetCallback<UpcastElementEvent>` _(internal)_

Returns the upcast converter for list items. It's supposed to work after the block converters (content inside list items) are converted.

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

#### Returns

* `GetCallback<UpcastElementEvent>`

<a id="function-reconvertItemsOnDataChange">

### `reconvertItemsOnDataChange( model, editing, attributeNames, listEditing ) → () => void` _(internal)_

Returns a model document change:data event listener that triggers conversion of related items if needed.

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

#### Parameters

* `model: Model`

  The editor model.

* `editing: EditingController`

  The editing controller.

* `attributeNames: Array<string>`

  The list of all model list attributes (including registered strategies).

* `listEditing: ListEditing`

  The document list editing plugin.

#### Returns

* `() => void`

---

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