8
0
فهرست منبع

Add getIntegration() method.

panr 5 سال پیش
والد
کامیت
204008a412
1فایلهای تغییر یافته به همراه13 افزوده شده و 0 حذف شده
  1. 13 0
      packages/ckeditor5-image/src/imageupload/ui/imageuploadpanelview.js

+ 13 - 0
packages/ckeditor5-image/src/imageupload/ui/imageuploadpanelview.js

@@ -139,6 +139,8 @@ export default class ImageUploadPanelView extends View {
 					} );
 				}
 
+				integrationView.name = integration;
+
 				this._integrations.add( integrationView );
 			}
 		}
@@ -213,6 +215,17 @@ export default class ImageUploadPanelView extends View {
 		}, { priority: 'high' } );
 	}
 
+	/**
+	 * Returns a view for the integration.
+	 *
+	 * @param {string} name The name of the integration.
+	 *
+	 * @returns {module:ui/view~View}
+	 */
+	getIntegration( name ) {
+		return this._integrations.find( integration => integration.name === name );
+	}
+
 	/**
 	 * Creates dropdown view.
 	 *