mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-08 04:18:06 +08:00
16 lines
292 B
TypeScript
16 lines
292 B
TypeScript
import { Command } from '../Editor'
|
|
|
|
type InsertTextCommand = (value: string) => Command
|
|
|
|
declare module '../Editor' {
|
|
interface Commands {
|
|
insertText: InsertTextCommand,
|
|
}
|
|
}
|
|
|
|
export const insertText: InsertTextCommand = value => ({ tr }) => {
|
|
tr.insertText(value)
|
|
|
|
return true
|
|
}
|