Преглед изворни кода

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

Szymon Cofalik пре 7 година
родитељ
комит
83ed0ac1ad
1 измењених фајлова са 2 додато и 1 уклоњено
  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 Command from '@ckeditor/ckeditor5-core/src/command';
+
 import ChangeBuffer from './utils/changebuffer';
 import ChangeBuffer from './utils/changebuffer';
 
 
 /**
 /**
@@ -82,7 +83,7 @@ export default class InputCommand extends Command {
 			this._buffer.lock();
 			this._buffer.lock();
 
 
 			if ( !isCollapsedRange ) {
 			if ( !isCollapsedRange ) {
-				writer.remove( range );
+				model.deleteContent( model.createSelection( range ) );
 			}
 			}
 
 
 			if ( text ) {
 			if ( text ) {