DevExpress-Examples / blazor-dxrichedit-export-to-doc

Create a button that exports an open document (to DOC).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blazor Rich Text Editor - How to export a document to a file (DOC format)

This example adds a custom button to the Download menu on the File tab. Click this button to export an open document to a file (DOC format) and save it in the project folder.

Blazor DxRichEdit export a document to the DOC format

Our Blazor Rich Text Editor supports the following document formats: DOCX, RTF, TXT, and HTML. You can use the RichEditDocumentServer component to import and export documents in DOC format. To add this component to your application, install the DevExpress.RichEdit.Core package.

The CustomizeRibbon event allows you to access and customize the Rich Text Editor's built-in ribbon UI. Call the AddCustomButton in the event handler to add a custom button to the ribbon. Execute the following actions in response to the click event to export the open document to a file (DOC format):

  1. Save the open document's content.
  2. Initialize a new instance of the RichEditDocumentServer class.
  3. Load document content to the document server.
  4. (Optional) Customize the document server's export options.
  5. Save the document to a file (DOC format).
  6. Use the downloadFileFromStream JS function to download the file.

Files to Look At

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Create a button that exports an open document (to DOC).

License:Other


Languages

Language:HTML 81.7%Language:C# 14.6%Language:JavaScript 3.6%