|
|
@@ -15,8 +15,7 @@ import List from '@ckeditor/ckeditor5-list/src/list';
|
|
|
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
|
|
import Undo from '@ckeditor/ckeditor5-undo/src/undo';
|
|
|
import Typing from '@ckeditor/ckeditor5-typing/src/typing';
|
|
|
-import ModelRange from '@ckeditor/ckeditor5-engine/src/model/range';
|
|
|
-import ModelPosition from '@ckeditor/ckeditor5-engine/src/model/position';
|
|
|
+
|
|
|
import global from '@ckeditor/ckeditor5-utils/src/dom/global';
|
|
|
import { getData, setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
|
|
|
|
|
|
@@ -420,7 +419,7 @@ describe( 'AutoMediaEmbed - integration', () => {
|
|
|
|
|
|
setTimeout( () => {
|
|
|
editor.model.enqueueChange( 'transparent', writer => {
|
|
|
- writer.insertText( characters[ i ], new ModelPosition( rootEl, [ 0, i ] ) );
|
|
|
+ writer.insertText( characters[ i ], writer.createPositionFromPath( rootEl, [ 0, i ] ) );
|
|
|
} );
|
|
|
}, i * 5 );
|
|
|
}
|
|
|
@@ -462,7 +461,7 @@ describe( 'AutoMediaEmbed - integration', () => {
|
|
|
pasteHtml( editor, 'https://www.youtube.com/watch?v=H08tGjXNHO4' );
|
|
|
|
|
|
editor.model.enqueueChange( 'transparent', writer => {
|
|
|
- writer.remove( ModelRange.createOn( editor.model.document.getRoot().getChild( 1 ) ) );
|
|
|
+ writer.remove( writer.createRangeOn( editor.model.document.getRoot().getChild( 1 ) ) );
|
|
|
} );
|
|
|
|
|
|
setTimeout( () => {
|
|
|
@@ -481,7 +480,7 @@ describe( 'AutoMediaEmbed - integration', () => {
|
|
|
|
|
|
editor.model.enqueueChange( 'transparent', writer => {
|
|
|
const paragraph = writer.createElement( 'paragraph' );
|
|
|
- writer.insert( paragraph, ModelPosition.createAfter( editor.model.document.getRoot().getChild( 0 ) ) );
|
|
|
+ writer.insert( paragraph, writer.createPositionAfter( editor.model.document.getRoot().getChild( 0 ) ) );
|
|
|
writer.setSelection( paragraph, 'in' );
|
|
|
} );
|
|
|
|
|
|
@@ -512,7 +511,7 @@ describe( 'AutoMediaEmbed - integration', () => {
|
|
|
|
|
|
editor.model.enqueueChange( 'transparent', writer => {
|
|
|
const paragraph = writer.createElement( 'paragraph' );
|
|
|
- writer.insert( paragraph, ModelPosition.createAfter( editor.model.document.getRoot().getChild( 1 ) ) );
|
|
|
+ writer.insert( paragraph, writer.createPositionAfter( editor.model.document.getRoot().getChild( 1 ) ) );
|
|
|
writer.setSelection( paragraph, 'in' );
|
|
|
} );
|
|
|
|