mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-09 13:28:04 +08:00
13 lines
283 B
TypeScript
13 lines
283 B
TypeScript
|
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()
|
||
|
}
|