Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
How to display attached images(uploaded via lightning-formatted-rich-text) in a modal

im trying to display images that are uploaded into a modal shown below:

<template iterator:thefield={images}> 
                <template if:true={imagesAttached}>
                    <div class="slds-file slds-file_card slds-float_right"  key={thefield.value.apiName} style="width: 15rem">
                        <div class="slds-grid slds-gutters">
                            <div class="slds-col slds-p-horizontal_medium">
                              <span> 
                                 <div class="slds-file slds-file_card slds-float_right" style="width: 15rem">
                                   <figure> 
                                     <img src={images} alt="Description of the image" />       
                                    </figure>
                                 </div>
                              </span>
                           </div>
                       </div>
                  </div>
               </template>
        </template>

I have a function that takes the image and put it in an array.

 getImages(string) {
        const imgRex =  /<img .*?>/g // /<img [^>]*src=['"]([^'"]+)[^>]*>/gi
        const images = [];
          let img;
          while ((img = imgRex.exec(string))) {
               images.push(img);
               if(images.length > 0){
                this.imagesAttached = true; 
            }
          }
        return images;
      }

I would appreciate the help. Thank you.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!