@portabletext/editor
Version:
Portable Text Editor made in React
12 lines (10 loc) • 333 B
text/typescript
import {Transforms} from 'slate'
import type {BehaviorOperationImplementation} from './behavior.operations'
export const moveForwardOperationImplementation: BehaviorOperationImplementation<
'move.forward'
> = ({operation}) => {
Transforms.move(operation.editor, {
unit: 'character',
distance: operation.distance,
})
}