menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RichTextEditorExportWord - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class RichTextEditorExportWord

    A class used for configuring the export word document settings in the SfRichTextEditor. It facilitates exporting editor content into a Word document format using a specified service URL.

    Inheritance
    System.Object
    RichTextEditorExportWord
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RichTextEditorExportWord : OwningComponentBase

    Constructors

    RichTextEditorExportWord()

    Declaration
    public RichTextEditorExportWord()

    Properties

    FileName

    Gets or sets the file name for the exported Word document.

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    System.String

    A System.String specifying the name of the exported Word file. The default value is Sample.docx.

    Remarks

    The specified file name will be applied to the Word document generated during the export process. Ensure that a valid ServiceUrl is configured to apply the specified file name correctly during the export process.

    Examples

    This example demonstrates how to configure the FileName:

    <SfRichTextEditor>
        <RichTextEditorExportWord FileName="@exportWordFileName" ServiceUrl="@exportWordServiceUrl"/>
    </SfRichTextEditor>
    @code {
        private string exportWordServiceUrl = "Enter the service URL here";
        private string exportWordFileName = "Result.docx";
    }

    ServiceUrl

    Gets or sets the URL of the service used to export the Rich Text Editor content to Word files.

    Declaration
    public string ServiceUrl { get; set; }
    Property Value
    Type Description
    System.String

    A System.String representing the URL of the service responsible for exporting Rich Text Editor content to a Word file. The default value is String.Empty.

    Remarks

    The service URL should point to a server endpoint capable of processing export requests and returning the generated Word file in response.

    Examples

    This example demonstrates how to configure the ServiceUrl:

    <SfRichTextEditor>
        <RichTextEditorExportWord ServiceUrl="@exportWordServiceUrl" />
    </SfRichTextEditor>
    @code {
        private string exportWordServiceUrl = "Enter the service URL here";
    }

    Stylesheet

    Gets or sets the stylesheet to be applied to the exported Word file.

    Declaration
    public string Stylesheet { get; set; }
    Property Value
    Type Description
    System.String

    A System.String containing the stylesheet used when exporting Rich Text Editor content to a Word file. The default value is String.Empty.

    Remarks

    The stylesheet enables the application of custom CSS styles to the exported Word file. Ensure that a valid ServiceUrl is configured to apply the specified stylesheet correctly during the export process.

    Examples

    This example demonstrates how to configure the Stylesheet:

    <SfRichTextEditor>
        <RichTextEditorExportWord Stylesheet="@exportWordStylesheet" ServiceURL="@exportWordServiceUrl"/>
    </SfRichTextEditor>
    @code {
        private string exportWordServiceUrl = "Enter the service URL here";
        private string exportWordStylesheet = ".e-rte-content { font-size: 1em; font-weight: 400; margin: 0; }"; 
    }

    Methods

    Dispose(Boolean)

    Dispose unmanaged resources in the Syncfusion Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Boolean value to dispose the object.

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved