Class SfDocumentEditorContainer
Document Editor Container component.
Implements
Namespace: Syncfusion.Blazor.DocumentEditor
Assembly: Syncfusion.Blazor.DocumentEditor.dll
Syntax
public class SfDocumentEditorContainer : SfBaseComponent, IDocumentEditorContainer
Constructors
SfDocumentEditorContainer()
Declaration
public SfDocumentEditorContainer()
Properties
CurrentUser
Current User.
Declaration
[Parameter]
public string CurrentUser { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accept the string value. The default value is empty. |
DocumentEditor
Gets DocumentEditor instance.
Declaration
[Parameter]
public SfDocumentEditor DocumentEditor { get; set; }
Property Value
| Type | Description |
|---|---|
| SfDocumentEditor | An instance of SfDocumentEditor class that represents the DocumentEditor. |
DocumentEditorSettings
Defines the settings for DocumentEditor customization.
Declaration
[Parameter]
public DocumentEditorSettingsModel DocumentEditorSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| DocumentEditorSettingsModel | A DocumentEditorSettingsModel object that defines the settings for customizing the DocumentEditor. The default value is |
DocumentSettings
Gets the DocumentSettings instance of the document that is opened in Document editor component.
Declaration
[Parameter]
public DocumentSettings DocumentSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| DocumentSettings | The DocumentSettings instance of the document. |
Remarks
This property provides an option to modify the compatibility mode of the active document, when a new document is created, or an existing document is opened. You can modify it in DocumentChanged event.
Examples
The following code example demonstrates how to modify compatibility mode for the document opened in Syncfusion Word Processor (Document editor) component.
//Sets compatibility mode for the active document as Word 2010.
sfDocumentEditor.DocumentSettings.CompatibilityMode = CompatibilityMode.Word2010;
EnableAutoFocus
Gets or sets a value indicating whether the automatic focus behavior is enabled for Document editor or not. The default value is false.
Declaration
[Parameter]
[JsonPropertyName("enableAutoFocus")]
public bool EnableAutoFocus { get; set; }
Property Value
| Type |
|---|
| bool |
Remarks
By default, the Document editor gets focused automatically when the page loads. If you want the Document editor not to be focused automatically, then set this property to false.
EnableChunkMessages
Gets or sets a Boolean value indicating whether to allow processing large files without increasing the maximum message size of a single incoming hub message (MaximumReceiveMessageSize 32KB). The default value is false.
Declaration
[Parameter]
public bool EnableChunkMessages { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableComment
Gets or set a value indicating whether comment is enabled or not.
Declaration
[Parameter]
public bool EnableComment { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableCsp
Enable rendering with strict Content Security policy.
Declaration
[Parameter]
public bool EnableCsp { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableLocalPaste
Enable local paste.
Declaration
[Parameter]
public bool EnableLocalPaste { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnablePersistence
Enable or disable persisting component's state between page reloads.
Declaration
[Parameter]
public bool EnablePersistence { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
[Parameter]
public bool EnableRtl { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableSpellCheck
Enable or disable spell checker in document editor container.
Declaration
[Parameter]
public bool EnableSpellCheck { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableToolbar
Enable or disable toolbar in document editor container.
Declaration
[Parameter]
public bool EnableToolbar { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableTrackChanges
Enable or disable track changes in document editor container.
Declaration
[Parameter]
public bool EnableTrackChanges { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Headers
Add custom headers to XMLHttpRequest.
Declaration
[Parameter]
public Dictionary<string, string> Headers { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, string> | A dictionary containing custom headers to be added to the XMLHttpRequest. |
Height
Defines the height of the DocumentEditorContainer component.
Declaration
[Parameter]
public string Height { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts the string value. The default value is |
LayoutType
Layout Type.
Declaration
[Parameter]
public LayoutType LayoutType { get; set; }
Property Value
| Type | Description |
|---|---|
| LayoutType | One of the LayoutType enumeration that specifies the type of layout. The default value is Pages. |
Locale
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
[Parameter]
public string Locale { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts the string value. The default value is empty. |
RestrictEditing
Restrict editing operation.
Declaration
[Parameter]
public bool RestrictEditing { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
ServerActionSettings
Defines the settings of the DocumentEditorContainer service.
Declaration
[Parameter]
public ContainerServerActionSettingsModel ServerActionSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| ContainerServerActionSettingsModel | An instance of the ContainerServerActionSettingsModel class, which defines the settings of the DocumentEditorContainer service. |
ServiceUrl
Sfdt service URL.
Declaration
[Parameter]
public string ServiceUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts the string value. The default value is empty. |
ShowPropertiesPane
Show or hide properties pane.
Declaration
[Parameter]
public bool ShowPropertiesPane { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Toolbar
Gets toolbar instance.
Declaration
public ToolbarModule Toolbar { get; }
Property Value
| Type |
|---|
| ToolbarModule |
ToolbarItems
Defines toolbar items for DocumentEditorContainer.
Declaration
[Parameter]
public object ToolbarItems { get; set; }
Property Value
| Type | Description |
|---|---|
| object | A list of objects that define the toolbar items for the DocumentEditorContainer. |
UseDefaultEditor
Gets or sets a value that indicates whether to display the default SfDocumentEditor instance initialized within the SfDocumentEditorContainer or the SfDocumentEditor instance defined in the application.
Declaration
[Parameter]
public bool UseDefaultEditor { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Examples
The following code example demonstrates how to define the SfDocumentEditor instance in the Blazor application level Razor file.
UserColor
User Selection Highlight Color.
Declaration
[Parameter]
public string UserColor { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts the string value. The default value is |
Width
Defines the width of the DocumentEditorContainer component.
Declaration
[Parameter]
public string Width { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts the string value. The default value is |
ZIndex
Specifies the z-order for rendering that determines whether the dialog is displayed in front or behind of another component.
Declaration
[Parameter]
public double ZIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Accepts the double value that specifies z-orders of the component. The default value is |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
GetMainComponentPlatform()
Returns SpreadsheetEditor platform for main component
Declaration
protected override Platform GetMainComponentPlatform()
Returns
| Type |
|---|
| Platform |
IsMainLicenseComponent()
Indicates this is a main license component
Declaration
protected override bool IsMainLicenseComponent()
Returns
| Type |
|---|
| bool |
OnAfterRenderAsync(bool)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | firstRender |
Returns
| Type |
|---|
| Task |
OnHybridInitialized()
Method invokes after component initialize.
Declaration
protected Task OnHybridInitialized()
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type |
|---|
| Task |
ResizeAsync(double?, double?)
Resizes the container component and its sub elements based on given size or client size.
Declaration
public Task ResizeAsync(double? width = null, double? height = null)
Parameters
| Type | Name | Description |
|---|---|---|
| double? | width | Specifies the width. |
| double? | height | Specifies the height. |
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
SetParametersAsync(ParameterView)
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
Returns
| Type |
|---|
| Task |
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
| Type |
|---|
| bool |