We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Responsive Images in ejRTe

Hello,

I can insert images into a Rich Text Editor using the image browser.  However if the RTE or the HTML is viewed on a small screen the images do not respond to the screen size.   

Is it possible for images inserted with image browser to resize so that they fit the screen size in use?

thanks,

Randy

1 Reply

KR Keerthana Rajendran Syncfusion Team July 20, 2016 01:13 PM UTC

Hi Randy, 

Thank you contacting Syncfusion support. 

We suggest you to fit the images to a particular width and height using css by checking the window.innerWidth in if condition  

<code> 
function onchange() 
                            
          if(window.innerWidth < 480) //Enter the inner width of small screens required 
         
                             $(".content-iframe").contents().find('img').css({'width':'100%','height':'100%'}); 
                              
         
       
</code> 

We have prepared a sample based on our understanding. Please refer the below link 


If we have misunderstood your requirement please get back to us with clear details 

Regards, 
Keerthana. 


Loader.
Live Chat Icon For mobile
Up arrow icon