The deleteRange command deletes everything in a given range. It requires a range attribute of type Range.
deleteRange
range
Range
range: Range
editor.commands.deleteRange({ from: 0, to: 12 })