refactoring

This commit is contained in:
Philipp Kühn
2020-03-04 21:27:22 +01:00
parent 8633404cc3
commit 4981571c20
2 changed files with 4 additions and 2 deletions

View File

@@ -6,7 +6,8 @@ declare module '../Editor' {
}
}
export default function insertText(next: Function, { state, view }: Editor, value: string): void {
export default function insertText(next: Function, editor: Editor, value: string): void {
const { view, state } = editor
const transaction = state.tr.insertText(value)
view.dispatch(transaction)