mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 18:09:49 +02:00
fix parse error
This commit is contained in:
@@ -656,7 +656,7 @@ export const NodeTransforms = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Editor.setNodes(editor, obj, options)
|
Editor.setNodes(editor, obj, options)
|
||||||
}
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unwrap the nodes at a location from a parent node, splitting the parent if
|
* Unwrap the nodes at a location from a parent node, splitting the parent if
|
||||||
|
@@ -20,19 +20,17 @@ const withSchema = defineSchema([
|
|||||||
const type = index === 0 ? 'title' : 'paragraph'
|
const type = index === 0 ? 'title' : 'paragraph'
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'child_invalid': {
|
case 'child_invalid':
|
||||||
|
case 'child_max_invalid': {
|
||||||
Editor.setNodes(editor, { type }, { at: path })
|
Editor.setNodes(editor, { type }, { at: path })
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'child_min_invalid': {
|
case 'child_min_invalid': {
|
||||||
const block = { type, children: [{ text: '' }] }
|
const block = { type, children: [{ text: '' }] }
|
||||||
Editor.insertNodes(editor, block, { at: path })
|
Editor.insertNodes(editor, block, { at: path })
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'child_max_invalid': {
|
|
||||||
Editor.setNodes(editor, { type }, { at: path })
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user