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

RichFormatText Image, Blob and post.

Thread ID:





147998 Oct 1,2019 10:44 AM UTC Oct 2,2019 08:05 AM UTC React - EJ 2 1
Tags: RichTextEditor
Asked On October 1, 2019 10:44 AM UTC

Dear all,
the requirement is to have a rich format text and insert images and then do a post to a  http service that works as mail backend. In the body of the post we send a json with
a field Text in which we put the html extracted from your component. When you insert an image in the component you create a blob reference. The idea is to fetch the data, convert in base64 and insert in the JSON with the following function:
async function retrieve(uri)
let response = await fetch(uri);
                if (response.ok) {
                let contentType = response.headers.get('Content-Type');
                console.log("Content Header " + contentType)
                console.log("Response data " + JSON.stringify(response.data))
                    if (response.data != null) {
                    let dataBlob = response.blob()
                            return dataBlob
The problem that i see is that the response.data is always empty when fetching your blob.

Pandiyaraj Muniyandi [Syncfusion]
Replied On October 2, 2019 08:05 AM UTC

Hi Giorgio, 
Greetings from Syncfusion support.  
We have analyzed your query, by default image saved as blob format in RichTextEditor. You can save image in base64 format by configuring saveFormat as “Base64“on “insertimagesettings“ as follows,  
Code example  
export class Default extends SampleBase {  
 constructor() {  
    this.imageSettings = {  
      saveFormat: "Base64"  
 render() {  
    return (  
    <RichTextEditorComponent insertImageSettings={this.imageSettings}>  
        <Inject services={[HtmlEditor, Toolbar, Image, Link, QuickToolbar]}/>  
We have prepared sample for your reference, get it from below link  
Kindly let us know if the provided information is helpful or not to achieve your requirement.  
Pandiyaraj M 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon