diff --git a/src/inputcommand.js b/src/inputcommand.js index 28465e8..458c93e 100644 --- a/src/inputcommand.js +++ b/src/inputcommand.js @@ -82,12 +82,10 @@ export default class InputCommand extends Command { this._buffer.lock(); - if ( !isCollapsedRange ) { - model.deleteContent( model.createSelection( range ) ); - } + model.deleteContent( model.createSelection( range ) ); if ( text ) { - writer.insertText( text, doc.selection.getAttributes(), range.start ); + model.insertContent( writer.createText( text, doc.selection.getAttributes() ), range.start ); } if ( resultRange ) {