# DowncastCleanSelectionEvent

typedef

Fired at the beginning of selection conversion, before [selection](module_engine_conversion_downcastdispatcher-DowncastDispatcher.md#event-selection) events.

Should be used to clean up the view state at the current selection position, before the selection is moved to another place.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/conversion/downcastdispatcher.ts#L869)

#### Value

`DowncastEvent<'cleanSelection'>`

## Fired by

* [DowncastDispatcher#cleanSelection](module_engine_conversion_downcastdispatcher-DowncastDispatcher.md#event-cleanSelection)

---

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