Typedef

PositionStickiness (engine/model)

@ckeditor/ckeditor5-engine/src/model/position

typedef'toNone' | 'toNext' | 'toPrevious'

Represents how position is "sticking" with neighbour nodes. Used to define how position should be transformed (moved) in edge cases. Possible values: 'toNone', 'toNext', 'toPrevious'.

Examples:

Insert. Position is at | and nodes are inserted at the same position, marked as ^:

- sticks to none:           <p>f^|oo</p>  ->  <p>fbar|oo</p>
- sticks to next node:      <p>f^|oo</p>  ->  <p>fbar|oo</p>
- sticks to previous node:  <p>f|^oo</p>  ->  <p>f|baroo</p>

Move. Position is at | and range [oo] is moved to position ^:

- sticks to none:           <p>f|[oo]</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>
- sticks to none:           <p>f[oo]|</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>

- sticks to next node:      <p>f|[oo]</p><p>b^ar</p>  ->  <p>f</p><p>b|ooar</p>
- sticks to next node:      <p>f[oo]|</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>

- sticks to previous node:  <p>f|[oo]</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>
- sticks to previous node:  <p>f[oo]|</p><p>b^ar</p>  ->  <p>f</p><p>boo|ar</p>

Filtering