Class RichTextEditorImportWord
A class used for configuring the import of Word documents into the SfRichTextEditor. This class enables the integration of Word document content within the Rich Text Editor.
Inherited Members
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorImportWord : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
RichTextEditorImportWord()
Declaration
public RichTextEditorImportWord()
Properties
MaxFileSize
Gets or sets the maximum allowed file size, in bytes, for Word documents imported in the SfRichTextEditor component.
Declaration
[Parameter]
public double MaxFileSize { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double representing the maximum permitted file size, in bytes. The default value is |
Remarks
This property restricts the size of Word documents that users can import via the dialog and uploader UI built into the SfRichTextEditor.
Files exceeding this size limit will be automatically rejected and an error message will be displayed to the user. Typical usage is to prevent performance or memory issues in client and server processing.
To allow larger documents, increase the value of this property as needed. To enforce a stricter size limit, set a lower value (minimum is 0). Negative values are not permitted and will be treated as 0.
Examples
<SfRichTextEditor>
<RichTextEditorImportWord MaxFileSize="10485760" />
</SfRichTextEditor>
ServiceUrl
Gets or sets the service URL for uploading a document to the server, which will then be imported into the Rich Text Editor.
Declaration
[Parameter]
public string? ServiceUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The service URL as a string for uploading documents to the server. The default value is |
Remarks
The ServiceUrl should point to a server endpoint capable of processing Word document uploads intended for import.
This setup ensures that Word documents can be seamlessly integrated into the Rich Text Editor interface.
Examples
This example demonstrates how to configure the ServiceUrl:
<SfRichTextEditor>
<RichTextEditorImportWord ServiceUrl="@importWordServiceUrl" />
</SfRichTextEditor>
@code {
private string importWordServiceUrl = "Enter the service URL here";
}
Methods
Dispose(bool)
Dispose unmanaged resources in the Syncfusion Blazor component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Boolean value to dispose the object. |
Overrides
OnAfterRenderAsync(bool)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | firstRender | Set to true if this is the first time OnAfterRender(Boolean) has been invoked. |
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type |
|---|
| Task |
Overrides
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
| Type |
|---|
| bool |