Explorar el Código

Changed: Use `Model#deleteContent` helper instead of using `model.Writer` directly to remove selected content on typing.

Szymon Cofalik hace 7 años
padre
commit
83ed0ac1ad
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      packages/ckeditor5-typing/src/inputcommand.js

+ 2 - 1
packages/ckeditor5-typing/src/inputcommand.js

@@ -8,6 +8,7 @@
  */
 
 import Command from '@ckeditor/ckeditor5-core/src/command';
+
 import ChangeBuffer from './utils/changebuffer';
 
 /**
@@ -82,7 +83,7 @@ export default class InputCommand extends Command {
 			this._buffer.lock();
 
 			if ( !isCollapsedRange ) {
-				writer.remove( range );
+				model.deleteContent( model.createSelection( range ) );
 			}
 
 			if ( text ) {