This is a migrated thread and some comments may be shown as answers.

How to export the editor content with image into word doc

3 Answers 283 Views
Editor
This is a migrated thread and some comments may be shown as answers.
sabarishbabu
Top achievements
Rank 1
sabarishbabu asked on 19 Dec 2009, 12:38 PM
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


3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 19 Dec 2009, 12:56 PM
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.
0
Ryan
Top achievements
Rank 1
answered on 03 Dec 2019, 03:40 PM
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?
0
Rumen
Telerik team
answered on 03 Dec 2019, 04:54 PM

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.
Tags
Editor
Asked by
sabarishbabu
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Ryan
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or