mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 09:29:49 +02:00
fix parse error
This commit is contained in:
@@ -656,7 +656,7 @@ export const NodeTransforms = {
|
||||
}
|
||||
|
||||
Editor.setNodes(editor, obj, options)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 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'
|
||||
|
||||
switch (code) {
|
||||
case 'child_invalid': {
|
||||
case 'child_invalid':
|
||||
case 'child_max_invalid': {
|
||||
Editor.setNodes(editor, { type }, { at: path })
|
||||
break
|
||||
}
|
||||
|
||||
case 'child_min_invalid': {
|
||||
const block = { type, children: [{ text: '' }] }
|
||||
Editor.insertNodes(editor, block, { at: path })
|
||||
break
|
||||
}
|
||||
case 'child_max_invalid': {
|
||||
Editor.setNodes(editor, { type }, { at: path })
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user