# utils/inserttopriorityarray

module

<a id="interfaces">

## Interfaces

<a id="interface-ObjectWithPriority">

### `ObjectWithPriority`

<a id="functions">

## Functions

<a id="function-insertToPriorityArray">

### `insertToPriorityArray( objects, objectToInsert ) → void`

Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/inserttopriorityarray.ts#L35)

#### Type parameters

* `T: extends ObjectWithPriority`

#### Parameters

* `objects: Array<T>`

  Array of objects with priority to insert object to.

* `objectToInsert: T`

  Object with `priority` property.

#### Returns

* `void`

---

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