mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-01 05:16:10 +01:00
fix images example schema (#2091)
This commit is contained in:
parent
fa343c07f4
commit
3ac1b13ce3
@ -62,8 +62,8 @@ function insertImage(change, src, target) {
|
||||
const schema = {
|
||||
document: {
|
||||
last: { type: 'paragraph' },
|
||||
normalize: (change, reason, { node, child }) => {
|
||||
switch (reason) {
|
||||
normalize: (change, { code, node, child }) => {
|
||||
switch (code) {
|
||||
case LAST_CHILD_TYPE_INVALID: {
|
||||
const paragraph = Block.create('paragraph')
|
||||
return change.insertNodeByKey(node.key, node.nodes.size, paragraph)
|
||||
|
Loading…
x
Reference in New Issue
Block a user