99% there

This commit is contained in:
Tom Moor
2017-11-08 00:08:35 -08:00
parent 51bc705488
commit 5d716d9c5f
10 changed files with 122 additions and 79 deletions

View File

@ -1,6 +1,6 @@
// @flow
import EditList from './plugins/EditList';
import type { State } from './types';
import type { State, Transform } from './types';
const { transforms } = EditList;
@ -10,9 +10,12 @@ type Options = {
append?: string | Object,
};
export function splitAndInsertBlock(state: State, options: Options) {
export function splitAndInsertBlock(
transform: Transform,
state: State,
options: Options
) {
const { type, wrapper, append } = options;
let transform = state.transform();
const { document } = state;
const parent = document.getParent(state.startBlock.key);