Fixed: Checklist items cant be created from shortcuts

Fixed: BlockToolbar not close on unfocus
This commit is contained in:
Tom Moor
2017-12-05 20:05:43 -08:00
parent 751b468e92
commit e3f664e8a4
14 changed files with 105 additions and 90 deletions

View File

@@ -18,17 +18,17 @@ export function splitAndInsertBlock(change: Change, options: Options) {
// lists get some special treatment
if (parent && parent.type === 'list-item') {
change = changes.unwrapList(
changes
.splitListItem(change.collapseToStart())
.collapseToEndOfPreviousBlock()
);
change
.collapseToStart()
.call(changes.splitListItem)
.collapseToEndOfPreviousBlock()
.call(changes.unwrapList);
}
change = change.insertBlock(type);
change.insertBlock(type);
if (wrapper) change = change.wrapBlock(wrapper);
if (append) change = change.insertBlock(append);
if (wrapper) change.wrapBlock(wrapper);
if (append) change.insertBlock(append);
return change;
}