UNPKG

slate-edit-table

Version:

A Slate plugin to handle keyboard events in tables.

20 lines (15 loc) 411 B
// @flow import { type Value } from 'slate'; import type Options from '../options'; import TablePosition from './TablePosition'; /** * The position of the selection start block, in the current table */ function getPosition( opts: Options, // The current value value: Value ): TablePosition { return TablePosition.create(opts, value.document, value.startKey); } export default getPosition;