@ckeditor/ckeditor5-image
Advanced tools
Comparing version 19.0.1 to 20.0.0
{ | ||
"name": "@ckeditor/ckeditor5-image", | ||
"version": "19.0.1", | ||
"version": "20.0.0", | ||
"description": "Image feature for CKEditor 5.", | ||
@@ -13,28 +13,28 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-clipboard": "^19.0.1", | ||
"@ckeditor/ckeditor5-core": "^19.0.1", | ||
"@ckeditor/ckeditor5-engine": "^19.0.1", | ||
"@ckeditor/ckeditor5-ui": "^19.0.1", | ||
"@ckeditor/ckeditor5-upload": "^19.0.1", | ||
"@ckeditor/ckeditor5-utils": "^19.0.1", | ||
"@ckeditor/ckeditor5-widget": "^19.1.0" | ||
"@ckeditor/ckeditor5-clipboard": "^20.0.0", | ||
"@ckeditor/ckeditor5-core": "^20.0.0", | ||
"@ckeditor/ckeditor5-engine": "^20.0.0", | ||
"@ckeditor/ckeditor5-ui": "^20.0.0", | ||
"@ckeditor/ckeditor5-upload": "^20.0.0", | ||
"@ckeditor/ckeditor5-utils": "^20.0.0", | ||
"@ckeditor/ckeditor5-widget": "^20.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^19.0.1", | ||
"@ckeditor/ckeditor5-block-quote": "^19.0.1", | ||
"@ckeditor/ckeditor5-cloud-services": "^19.0.1", | ||
"@ckeditor/ckeditor5-editor-classic": "^19.0.1", | ||
"@ckeditor/ckeditor5-enter": "^19.0.1", | ||
"@ckeditor/ckeditor5-easy-image": "^19.0.1", | ||
"@ckeditor/ckeditor5-heading": "^19.0.1", | ||
"@ckeditor/ckeditor5-indent": "^19.0.1", | ||
"@ckeditor/ckeditor5-link": "^19.0.1", | ||
"@ckeditor/ckeditor5-list": "^19.0.1", | ||
"@ckeditor/ckeditor5-paragraph": "^19.1.0", | ||
"@ckeditor/ckeditor5-table": "^19.1.0", | ||
"@ckeditor/ckeditor5-typing": "^19.0.1", | ||
"@ckeditor/ckeditor5-undo": "^19.0.1" | ||
"@ckeditor/ckeditor5-basic-styles": "^20.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^20.0.0", | ||
"@ckeditor/ckeditor5-cloud-services": "^20.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^20.0.0", | ||
"@ckeditor/ckeditor5-enter": "^20.0.0", | ||
"@ckeditor/ckeditor5-easy-image": "^20.0.0", | ||
"@ckeditor/ckeditor5-heading": "^20.0.0", | ||
"@ckeditor/ckeditor5-indent": "^20.0.0", | ||
"@ckeditor/ckeditor5-link": "^20.0.0", | ||
"@ckeditor/ckeditor5-list": "^20.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^20.0.0", | ||
"@ckeditor/ckeditor5-table": "^20.0.0", | ||
"@ckeditor/ckeditor5-typing": "^20.0.0", | ||
"@ckeditor/ckeditor5-undo": "^20.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0", | ||
"node": ">=12.0.0", | ||
"npm": ">=5.7.1" | ||
@@ -41,0 +41,0 @@ }, |
@@ -128,8 +128,4 @@ /** | ||
if ( data.attributeNewValue !== null ) { | ||
viewWriter.setAttribute( data.attributeKey, data.attributeNewValue, img ); | ||
} else { | ||
viewWriter.removeAttribute( data.attributeKey, img ); | ||
} | ||
viewWriter.setAttribute( data.attributeKey, data.attributeNewValue || '', img ); | ||
} | ||
} |
@@ -116,2 +116,4 @@ /** | ||
* | ||
* The `<img>` can be wrapped to other elements, e.g. `<a>`. Nested check required. | ||
* | ||
* @param {module:engine/view/element~Element} figureView | ||
@@ -121,3 +123,13 @@ * @returns {module:engine/view/element~Element} | ||
export function getViewImgFromWidget( figureView ) { | ||
return Array.from( figureView.getChildren() ).find( viewChild => viewChild.is( 'img' ) ); | ||
const figureChildren = []; | ||
for ( const figureChild of figureView.getChildren() ) { | ||
figureChildren.push( figureChild ); | ||
if ( figureChild.is( 'element' ) ) { | ||
figureChildren.push( ...figureChild.getChildren() ); | ||
} | ||
} | ||
return figureChildren.find( viewChild => viewChild.is( 'img' ) ); | ||
} | ||
@@ -124,0 +136,0 @@ |
@@ -138,3 +138,3 @@ /** | ||
for ( const prop in defaultStyle ) { | ||
if ( !style.hasOwnProperty( prop ) ) { | ||
if ( !Object.prototype.hasOwnProperty.call( style, prop ) ) { | ||
extendedStyle[ prop ] = defaultStyle[ prop ]; | ||
@@ -141,0 +141,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
260254
3233
+ Added@ckeditor/ckeditor5-clipboard@20.0.0(transitive)
+ Added@ckeditor/ckeditor5-core@20.0.0(transitive)
+ Added@ckeditor/ckeditor5-engine@20.0.0(transitive)
+ Added@ckeditor/ckeditor5-typing@20.0.0(transitive)
+ Added@ckeditor/ckeditor5-ui@20.0.0(transitive)
+ Added@ckeditor/ckeditor5-upload@20.0.0(transitive)
+ Added@ckeditor/ckeditor5-utils@20.0.0(transitive)
+ Added@ckeditor/ckeditor5-widget@20.0.0(transitive)
- Removed@ckeditor/ckeditor5-clipboard@19.0.1(transitive)
- Removed@ckeditor/ckeditor5-core@19.0.1(transitive)
- Removed@ckeditor/ckeditor5-engine@19.0.1(transitive)
- Removed@ckeditor/ckeditor5-ui@19.0.1(transitive)
- Removed@ckeditor/ckeditor5-upload@19.0.1(transitive)
- Removed@ckeditor/ckeditor5-utils@19.0.2(transitive)
- Removed@ckeditor/ckeditor5-widget@19.1.0(transitive)