HTMLText does not include image bytes

Hey guys,

In the SFRichTextEditor, I configured the InsertImageCommand allowing the user to add images. 


The problem is that image bytes are not available in the HtmlText property and I´m using that property to save the edited html.


This is the image tag generated after I inserted an image:

Logo


How can I do to get the bytes of the added image so I can populate the correct src code there?


Is there any way I can get the mapping between that Id and the image bytes?




4 Replies

DS Devaraj Sekar Syncfusion Team May 8, 2020 12:34 PM UTC

Hi Andres,  
Thank you for contacting Syncfusion support.   
Currently, we don’t have support to retrieve image bytes from Html Text. We have planned to include base64 strings as image in HtmlText.  This feature will be available in Essential Studio Volume 1 Service Pack 1 release which is estimated to be available on 13th May 2020 tentatively. We will let you know when this feature is implemented. The status of implementation can be tracked through our Features Management System:   
Regards,  
Devaraj S 



DS Devaraj Sekar Syncfusion Team May 14, 2020 10:09 AM UTC

Hi Andres, 
Thank you for the patience.  
The support with “Retrieving RichTextEditor image as base64 string” has been implemented and included in our Essential Studio Volume 1 Service Pack release, which can be downloaded from the below mentioned link.  
We have prepared a sample based on the implemented feature which can be downloaded from the below link.  
To save the image as base64 in Html, kindly use the below mentioned code snippet  
Syncfusion.XForms.RichTextEditor.ImageSource imageSource = new Syncfusion.XForms.RichTextEditor.ImageSource                
  {                
      ImageStream = imageStream,                
      SaveOption = ImageSaveOption.Base64          
        };               
   imageInsertedEventArgs.ImageSourceCollection.Add(imageSource);              
 

Kindly let us know if you require any further assistance.  

Regards,  
Devaraj S 



AA Andres Arrigonni May 18, 2020 02:32 PM UTC

Hi guys,

I tested it and seems to have serious performance issues with images bigger than 50Kb. Is that possible?
Is there anything I can turn off so images bigger than 50kb don't make the editor to crash?

Is there a max-size supported?

Thanks!



DS Devaraj Sekar Syncfusion Team May 19, 2020 11:10 AM UTC

Hi Andres, 
Thank you for your interest in Syncfusion product. 
We have tried to reproduce the mentioned issue with “Crash in SfRichTextEditor with large image (50 KB)”. But, it works as expected from our side without any crash. We have shared a sample that we tired at our end, which can be downloaded from the below link. 
Kindly provide us the below metioned information or please modify the above sample to reproduce the issue which will be helpful to provide you the prompt solution. 
  1. Device information (RAM , Simulator version )
  2. Number of images with size
  3. Replication procedure
  4. Design layouts of your sample 
Regards, 
Devaraj S 


Loader.
Up arrow icon