From bddd5b3da74d8db21d61205e2651659d69ef85c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 22 Apr 2020 14:41:43 +0200 Subject: [PATCH] change order --- packages/core/src/commands/replaceWithNode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/commands/replaceWithNode.ts b/packages/core/src/commands/replaceWithNode.ts index b29d38824..3d6245950 100644 --- a/packages/core/src/commands/replaceWithNode.ts +++ b/packages/core/src/commands/replaceWithNode.ts @@ -8,9 +8,9 @@ interface Range { } type ReplaceWithNode = ( - range: Range, type: NodeType, attrs: {}, + range?: Range, ) => any 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 { $from, $to } = state.selection const type = getNodeType(typeOrName, schema)