Files
tiptap/packages/tiptap-core/src/commands/clearContent.ts
2020-03-29 23:24:37 +02:00

14 lines
335 B
TypeScript

import { Editor } from '../Editor'
import { TextSelection } from 'prosemirror-state'
declare module '../Editor' {
interface Editor {
clearContent(emitUpdate?: Boolean): Editor,
}
}
export default function clearContent(next: Function, editor: Editor, emitUpdate = false): void {
editor.setContent('', emitUpdate)
next()
}