@atlaskit/editor-plugin-list
Version:
List plugin for @atlaskit/editor-core
5 lines • 331 B
JavaScript
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
export var isFirstChildOfParent = function isFirstChildOfParent(state) {
var $from = state.selection.$from;
return $from.depth > 1 ? state.selection instanceof GapCursorSelection && $from.parentOffset === 0 || $from.index($from.depth - 1) === 0 : true;
};