8
0
panr 5 лет назад
Родитель
Сommit
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 );
 			}
 		}
@@ -214,6 +216,17 @@ export default class ImageUploadPanelView extends View {
 	}
 
 	/**
+	 * 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.
 	 *
 	 * @param {module:utils/locale~Locale} locale The localization services instance.