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.
Inheritance
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorImportWord : OwningComponentBase
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
public double MaxFileSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.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
public string ServiceUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | The service URL as a System.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(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. |
OnAfterRenderAsync(Boolean)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Set to true if this is the first time OnAfterRender(Boolean) has been invoked. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
Type |
---|
System.Boolean |