Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge branch t/ckeditor5-engine/1554
Browse files Browse the repository at this point in the history
Internal: Aligned code to changes in the engine. See ckeditor/ckeditor5-engine#1554.
  • Loading branch information
Reinmar committed Oct 26, 2018
2 parents ff5394a + 712247f commit 1ad061d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/image/converters.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function viewFigureToModel() {
}

// Convert rest of the figure element's children as an image children.
conversionApi.convertChildren( data.viewItem, ModelPosition.createAt( modelImage ) );
conversionApi.convertChildren( data.viewItem, ModelPosition.createAt( modelImage, 0 ) );

// Set image range as conversion result.
data.modelRange = conversionResult.modelRange;
Expand Down
2 changes: 1 addition & 1 deletion src/image/imageediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function createImageViewElement( writer ) {
const emptyElement = writer.createEmptyElement( 'img' );
const figure = writer.createContainerElement( 'figure', { class: 'image' } );

writer.insert( ViewPosition.createAt( figure ), emptyElement );
writer.insert( ViewPosition.createAt( figure, 0 ), emptyElement );

return figure;
}
2 changes: 1 addition & 1 deletion tests/image/imageloadobserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe( 'ImageLoadObserver', () => {
view.change( writer => {
const text = writer.createText( 'foo', { b: true } );

writer.insert( Position.createAt( viewRoot.getChild( 0 ).getChild( 0 ) ), text );
writer.insert( Position.createAt( viewRoot.getChild( 0 ).getChild( 0 ), 0 ), text );
writer.wrap( Range.createOn( text ), writer.createAttributeElement( 'b' ) );
} );

Expand Down

0 comments on commit 1ad061d

Please sign in to comment.