# restricted-editing/restrictededitingmode/utils

module

<a id="functions">

## Functions

<a id="function-getExceptionRange">

### `getExceptionRange( marker, model ) → ModelRange` _(internal)_

Returns the marker range asjusted to the inside of exception wrapper element if needed.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-restricted-editing/src/restrictededitingmode/utils.ts#L76)

#### Parameters

* `marker: Marker`
* `model: Model`

#### Returns

* `ModelRange`

<a id="function-getMarkerAtPosition">

### `getMarkerAtPosition( editor, position ) → Marker | undefined` _(internal)_

Returns a single "restricted-editing-exception" marker at a given position. Contrary to [`getMarkersAtPosition`](module_engine_model_markercollection-MarkerCollection.md#function-getMarkersAtPosition), it returns a marker also when the position is equal to one of the marker's start or end positions.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-restricted-editing/src/restrictededitingmode/utils.ts#L20)

#### Parameters

* `editor: Editor`
* `position: ModelPosition`

#### Returns

* `Marker | undefined`

<a id="function-isPositionInRangeBoundaries">

### `isPositionInRangeBoundaries( range, position ) → boolean` _(internal)_

Checks if the position is fully contained in the range. Positions equal to range start or end are considered "in".

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-restricted-editing/src/restrictededitingmode/utils.ts#L37)

#### Parameters

* `range: ModelRange`
* `position: ModelPosition`

#### Returns

* `boolean`

<a id="function-isSelectionInMarker">

### `isSelectionInMarker( selection, model, marker? ) → boolean` _(internal)_

Checks if the selection is fully contained in the marker. Positions on marker boundaries are considered "in".

```xml
<marker>[]foo</marker> -> true
<marker>f[oo]</marker> -> true
<marker>f[oo</marker> ba]r -> false
<marker>foo</marker> []bar -> false
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-restricted-editing/src/restrictededitingmode/utils.ts#L57)

#### Parameters

* `selection: ModelDocumentSelection`
* `model: Model`
* `marker?: Marker`

#### Returns

* `boolean`

---

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