Hope someone can help me. I am building a small proof of concept in a powerpoint AddIn using Angular and Typescript. In my addin, the user selects one or more images. This part I have working. Then, when they push the submit button, I want the selected pictures to be added into the slide. I know the images have to be converted into base64 and then added to the slide, I just don't know how.
<div class="image-container">
<img mat-card-image *ngFor="let image of images" class="image" width="100" height="100" [src]="image.url"
(click)="onClick(image)" [ngClass]="{'borderIt': isSelected(image)}"></div>
<button (click)="onSubmit()">Submit</button>
.ts
onSubmit() {
console.log(this.selectedImages); //this is the array of selected images
if (this.selectedImages.length >0) {
for (let png of this.selectedImages){
}
}
}
Any help is welcome. Thanks in advance!