menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDocumentEditorContainer - API Reference

    Show / Hide Table of Contents

    Class SfDocumentEditorContainer

    Document Editor Container component.

    Inheritance
    System.Object
    SfDocumentEditorContainer
    Implements
    IDocumentEditorContainer
    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 null.

    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 Description
    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

    true, if chunked messages are enabled for processing large files. Otherwise, false.

    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

    true, if the comment can be enabled. Otherwise, false. The default value is true.

    EnableCsp

    Enable rendering with strict Content Security policy.

    Declaration
    public bool EnableCsp { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the content security policy can be enabled. Otherwise, false.

    EnableLocalPaste

    Enable local paste.

    Declaration
    public bool EnableLocalPaste { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the local paste can be enabled. Otherwise, false. The default value is false.

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the persistence can be enabled. Otherwise, false. The default value is false.

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the right to left direction can be enabled. Otherwise, false. The default value is false.

    EnableSpellCheck

    Enable or disable spell checker in document editor container.

    Declaration
    public bool EnableSpellCheck { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the spell checker can be enabled. Otherwise, false. The default value is false.

    EnableToolbar

    Enable or disable toolbar in document editor container.

    Declaration
    public bool EnableToolbar { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the toolbar can be enabled. Otherwise, false. The default value is true.

    EnableTrackChanges

    Enable or disable track changes in document editor container.

    Declaration
    public bool EnableTrackChanges { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the track changes can be enabled. Otherwise, false. The default value is false.

    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 320px.

    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

    true, if the restrict editing operation can be enabled. Otherwise, false. The default value is false.

    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

    true, if the properties pane should be shown. Otherwise, false. The default value is true.

    Toolbar

    Gets toolbar instance.

    Declaration
    public ToolbarModule Toolbar { get; }
    Property Value
    Type Description
    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

    True The default value is true Otherwise False SfDocumentEditor instance defined in the application level (Razor file) should be rendered instead of the default SfDocumentEditor instance initialized within the SfDocumentEditorContainer component.

    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 #FFFF00.

    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 100%.

    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 2000.

    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 Description
    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 Description
    System.Threading.Tasks.Task

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    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 Description
    System.Boolean

    Implements

    IDocumentEditorContainer
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved