How to export the editor content with image into word doc

4 posts, 0 answers
  1. sabarishbabu
    sabarishbabu avatar
    136 posts
    Member since:
    Apr 2009

    Posted 19 Dec 2009 Link to this post

    Hi,

      I am inserting image into the editor using image Manager and writing some contents in the editor.I would like to export the editor content with images to word document.

    Am using these below code to export to word

                   HttpContext.Current.Response.Clear();
                    HttpContext.Current.Response.Charset = "";

                    HttpContext.Current.Response.ContentType = "application/msword";
                    string strFileName = "";
                  
                    strFileName = "GenerateDocument" + ".doc";
                    
                    HttpContext.Current.Response.AddHeader("Content-Disposition",
                      "inline;filename=" + strFileName);

                    StringBuilder strHTMLContent = new StringBuilder();
                    strHTMLContent.Append("<body lang=EN-US >");
                    strHTMLContent.Append(RadEditor1.Content);
                    strHTMLContent.Append("</body>");

                    
                    HttpContext.Current.Response.Write(strHTMLContent);
                    HttpContext.Current.Response.End();
                    HttpContext.Current.Response.Flush();


    But I am not able to export the image into word doc.

    please solve my problem.I have to export the image into the word document

    Thanks for any help


  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 19 Dec 2009 Link to this post

    Hi sabarishbabu,

     

    RadEditor is an HTML / XHTML editor and it does not offer direct export to MS Word because it is not offer by the browser itself. My suggestion is to search in Google for some third party HTML2DOC converter that will convert the generated by RadEditor HTML content to DOC formatting and allow you to save the content in MS Word DOC file. You can find the following link useful: http://www.w3.org/Tools/html2things.html.

    The following KB article shows how to export the HTML content to PDF using a third party tool: Converting RadEditor HTML to PDF format. You can use it as a base to implement your scenario with a third party control
    http://www.telerik.com/support/kb/aspnet-ajax/editor/converting-radeditor-html-to-pdf-format.aspx

    Best wishes,
    Svetlina
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Ryan
    Ryan avatar
    1 posts
    Member since:
    Oct 2019

    Posted 03 Dec 2019 Link to this post

    I know this original post is a few years old, but I am currently trying to export editor content with an image to a Word document. Is it still the case that RadEditor does not export documents with images, or is there another way to export content with images to a Word doc?
  4. Rumen
    Admin
    Rumen avatar
    14275 posts

    Posted 03 Dec 2019 Link to this post

    Hi Ryan,

    The current version of RadEditor can export images to Word files. For example you can test the following two demos:

    I hope this helps!

    Best wishes,

    Rumen
    the Telerik team

     


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top