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.
Unfortunately, activation email could not send to your email. Please try again.

Responsive Images in ejRTe

Thread ID:

Created:

Updated:

Platform:

Replies:

125042 Jul 16,2016 09:15 PM Jul 20,2016 09:13 AM JavaScript 1
loading
Tags: ejRTE
Randy Craven
Asked On July 16, 2016 09:15 PM

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

Keerthana Rajendran [Syncfusion]
Replied On July 20, 2016 09:13 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;