add some tests
This commit is contained in:
12
packages/tiptap-core/src/commands/insertText.ts
Normal file
12
packages/tiptap-core/src/commands/insertText.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Editor } from '../Editor'
|
||||
|
||||
declare module "../Editor" {
|
||||
interface Editor {
|
||||
insertText(text: string): Editor,
|
||||
}
|
||||
}
|
||||
|
||||
export default function insertText(next: Function, { state, view }: Editor, text: string): void {
|
||||
view.dispatch(state.tr.insertText(text))
|
||||
next()
|
||||
}
|
||||
Reference in New Issue
Block a user