@worktile/theia 15.1.18 → 15.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8367,7 +8367,12 @@ class TheImageComponent extends TheBaseElementComponent {
8367
8367
  }
8368
8368
  super.ngOnInit();
8369
8369
  this.imagePluginOptions = getPluginOptions(this.editor, PluginKeys.image);
8370
- this.disablePreview = this.imagePluginOptions.disablePreview;
8370
+ if (this.imagePluginOptions.disablePreview && typeof this.imagePluginOptions.disablePreview === 'function') {
8371
+ this.disablePreview = this.imagePluginOptions.disablePreview(this.editor);
8372
+ }
8373
+ else {
8374
+ this.disablePreview = this.imagePluginOptions.disablePreview;
8375
+ }
8371
8376
  }
8372
8377
  imageClick() {
8373
8378
  const index = this.imageGroupComponent.images.findIndex(item => item === this.imageDirective);