Class SfDocumentEditorContainer
Document Editor Container component.
Inheritance
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
public string CurrentUser { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accept the string value. The default value is empty. |
DocumentEditor
Gets DocumentEditor instance.
Declaration
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
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
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 DocumentEditorEvents 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
public bool EnableAutoFocus { get; set; }
Property Value
Type |
---|
System.Boolean |
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
public bool EnableChunkMessages { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableComment
Gets or set a value indicating whether comment is enabled or not.
Declaration
public bool EnableComment { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableCsp
Enable rendering with strict Content Security policy.
Declaration
public bool EnableCsp { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableLocalPaste
Enable local paste.
Declaration
public bool EnableLocalPaste { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnablePersistence
Enable or disable persisting component's state between page reloads.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableSpellCheck
Enable or disable spell checker in document editor container.
Declaration
public bool EnableSpellCheck { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableToolbar
Enable or disable toolbar in document editor container.
Declaration
public bool EnableToolbar { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableTrackChanges
Enable or disable track changes in document editor container.
Declaration
public bool EnableTrackChanges { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Headers
Add custom headers to XMLHttpRequest.
Declaration
public Dictionary<string, string> Headers { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | A dictionary containing custom headers to be added to the XMLHttpRequest. |
Height
Defines the height of the DocumentEditorContainer component.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
LayoutType
Layout Type.
Declaration
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
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
RestrictEditing
Restrict editing operation.
Declaration
public bool RestrictEditing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ServerActionSettings
Defines the settings of the DocumentEditorContainer service.
Declaration
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
public string ServiceUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
ShowPropertiesPane
Show or hide properties pane.
Declaration
public bool ShowPropertiesPane { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Toolbar
Gets toolbar instance.
Declaration
public ToolbarModule Toolbar { get; }
Property Value
Type |
---|
ToolbarModule |
ToolbarItems
Defines toolbar items for DocumentEditorContainer.
Declaration
public object ToolbarItems { get; set; }
Property Value
Type | Description |
---|---|
System.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
public bool UseDefaultEditor { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
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
public string UserColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
Width
Defines the width of the DocumentEditorContainer component.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.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
public double ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type |
---|
System.Threading.Tasks.Task |
OnHybridInitialized()
Method invokes after component initialize.
Declaration
protected Task OnHybridInitialized()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the 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 |
ResizeAsync(Nullable<Double>, Nullable<Double>)
Resizes the container component and its sub elements based on given size or client size.
Declaration
public Task ResizeAsync(Nullable<double> width = null, Nullable<double> height = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Double> | width | Specifies the width. |
System.Nullable<System.Double> | height | Specifies the height. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
Type |
---|
System.Boolean |