|
@@ -12,6 +12,7 @@ class WYSIWYGEditor {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
this.selectedImages = [];
|
|
this.selectedImages = [];
|
|
|
|
|
+ this.galleryImages = [];
|
|
|
this.resizingImage = null;
|
|
this.resizingImage = null;
|
|
|
this.resizeData = null;
|
|
this.resizeData = null;
|
|
|
this.aspectRatioLocked = true;
|
|
this.aspectRatioLocked = true;
|
|
@@ -177,12 +178,16 @@ class WYSIWYGEditor {
|
|
|
const data = await response.json();
|
|
const data = await response.json();
|
|
|
|
|
|
|
|
if (data.success) {
|
|
if (data.success) {
|
|
|
|
|
+ // Store images for later use
|
|
|
|
|
+ this.galleryImages = data.images;
|
|
|
this.renderGalleryImages(data.images);
|
|
this.renderGalleryImages(data.images);
|
|
|
} else {
|
|
} else {
|
|
|
console.error('Failed to load images:', data.error);
|
|
console.error('Failed to load images:', data.error);
|
|
|
|
|
+ this.galleryImages = [];
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('Error loading images:', error);
|
|
console.error('Error loading images:', error);
|
|
|
|
|
+ this.galleryImages = [];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|