change order
This commit is contained in:
@@ -8,9 +8,9 @@ interface Range {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ReplaceWithNode = (
|
type ReplaceWithNode = (
|
||||||
range: Range,
|
|
||||||
type: NodeType,
|
type: NodeType,
|
||||||
attrs: {},
|
attrs: {},
|
||||||
|
range?: Range,
|
||||||
) => any
|
) => any
|
||||||
|
|
||||||
declare module '../Editor' {
|
declare module '../Editor' {
|
||||||
@@ -19,7 +19,7 @@ declare module '../Editor' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (next: Function, editor: Editor): ReplaceWithNode => (range, typeOrName, attrs) => {
|
export default (next: Function, editor: Editor): ReplaceWithNode => (typeOrName, attrs, range) => {
|
||||||
const { view, state, schema } = editor
|
const { view, state, schema } = editor
|
||||||
const { $from, $to } = state.selection
|
const { $from, $to } = state.selection
|
||||||
const type = getNodeType(typeOrName, schema)
|
const type = getNodeType(typeOrName, schema)
|
||||||
|
|||||||
Reference in New Issue
Block a user