add withAttributes and withMarks option to splitBlock command

This commit is contained in:
Philipp Kühn
2020-11-04 17:01:51 +01:00
parent 1d3de73f82
commit 09ddf954a7
4 changed files with 47 additions and 8 deletions

View File

@@ -49,7 +49,9 @@ const TextAlign = createExtension({
// TODO: re-use only 'textAlign' attribute
// TODO: use custom splitBlock only for `this.options.types`
// TODO: use complete default enter handler (chainCommand) with custom splitBlock
Enter: () => this.editor.splitBlock(true),
Enter: () => this.editor.splitBlock({
withAttributes: true,
}),
}
},
})