menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class EditorModule - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class EditorModule

    Represents the editor module in DocumentEditor.

    Inheritance
    System.Object
    EditorModule
    Namespace: Syncfusion.Blazor.DocumentEditor
    Assembly: Syncfusion.Blazor.DocumentEditor.dll
    Syntax
    public class EditorModule : Object

    Constructors

    EditorModule(SfDocumentEditor)

    Initializes a new instance of the EditorModule class. Default constructor for ContextMenu.

    Declaration
    public EditorModule(SfDocumentEditor baseComponent)
    Parameters
    Type Name Description
    SfDocumentEditor baseComponent

    An DocumentEdiorComponent instance.

    Properties

    DocumentEditor

    DocumentEdiorComponent instance.

    Declaration
    protected SfDocumentEditor DocumentEditor { get; set; }
    Property Value
    Type
    SfDocumentEditor

    Methods

    ApplyBordersAsync(BorderSettings)

    Applies the borders based on given settings.

    Declaration
    public Task ApplyBordersAsync(BorderSettings settings)
    Parameters
    Type Name Description
    BorderSettings settings

    An BorderSettings instance.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ApplyBulletAsync(String, String)

    Applies the bullet list to selected paragraphs.

    Declaration
    public Task ApplyBulletAsync(string bullet, string fontFamily)
    Parameters
    Type Name Description
    System.String bullet

    Bullet Unicode value.

    System.String fontFamily

    Font family of the bullet.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ApplyNumberingAsync(String, Nullable<ListLevelPattern>)

    Applies the numbering list to selected paragraphs.

    Declaration
    public Task ApplyNumberingAsync(string numberFormat, Nullable<ListLevelPattern> listLevelPattern = null)
    Parameters
    Type Name Description
    System.String numberFormat

    Number format string.

    System.Nullable<ListLevelPattern> listLevelPattern

    List level pattern. Refer ListLevelPattern.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ApplyPasteOptionsAsync(PasteOptions)

    Apply the paste option.

    Declaration
    public Task ApplyPasteOptionsAsync(PasteOptions options)
    Parameters
    Type Name Description
    PasteOptions options

    Paste option, refer PasteOptions.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ApplyStyleAsync(String, Boolean)

    Apply style for paragraph.

    Declaration
    public Task ApplyStyleAsync(string style, bool clearDirectFormatting = false)
    Parameters
    Type Name Description
    System.String style

    Style name to be applied.

    System.Boolean clearDirectFormatting

    Clear the existing formats for the selected text.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    AutoFitTableAsync(AutoFitType)

    Apply auto fit type for the table.

    Declaration
    public Task AutoFitTableAsync(AutoFitType fitType)
    Parameters
    Type Name Description
    AutoFitType fitType

    Auto fit type, refer AutoFitType.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    CanMergeCellsAsync()

    Check if the merge cell operation can be done.

    Declaration
    public Task<bool> CanMergeCellsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    Returns an asynchronous operation of boolean type.

    ClearFormattingAsync()

    Clears the formatting.

    Declaration
    public Task ClearFormattingAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ClearListAsync()

    Clears the list format for selected paragraphs.

    Declaration
    public Task ClearListAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    CreateStyleAsync(String)

    Creates a new instance of Style.

    Declaration
    public Task CreateStyleAsync(string styleString)
    Parameters
    Type Name Description
    System.String styleString

    Style string.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    CreateStyleAsync(String, Boolean)

    Creates a new style or modifies an existing style with the specified style properties.

    Declaration
    public Task<string> CreateStyleAsync(string styleString, bool modifyExistingStyle)
    Parameters
    Type Name Description
    System.String styleString

    The style properties.

    System.Boolean modifyExistingStyle

    The Boolean value denotes whether to modify the properties in the existing style or create a new style.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>

    Returns the name of the created style.

    Remarks

    If modifyExistingStyle parameter is set to true and a style already exists with same name, it modifies the specified properties in the existing style.

    If modifyExistingStyle parameter is set to false and a style already exists with same name, it creates a new style with unique name by appending ‘_1’. Hence, the newly style will not have the specified name and this method returns the modified name.

    If no style exists with same name, it creates a new style.

    CutAsync()

    Moves the selected content in the document editor control to clipboard.

    Declaration
    public Task CutAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DecreaseIndentAsync()

    Decreases the left indent of selected paragraphs to a factor of 36 points.

    Declaration
    public Task DecreaseIndentAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DeleteAllCommentsAsync()

    Delete all the comments in current document.

    Declaration
    public Task DeleteAllCommentsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DeleteAsync()

    Remove the current selected content or one character right of cursor.

    Declaration
    public Task DeleteAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DeleteBookmarkAsync(String)

    Deletes specific bookmark.

    Declaration
    public Task DeleteBookmarkAsync(string name)
    Parameters
    Type Name Description
    System.String name

    Bookmark name.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DeleteColumnAsync()

    Deletes the selected column(s).

    Declaration
    public Task DeleteColumnAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DeleteCommentAsync()

    Delete current selected comment.

    Declaration
    public Task DeleteCommentAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DeleteRowAsync()

    Deletes the selected row(s).

    Declaration
    public Task DeleteRowAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    DeleteTableAsync()

    Deletes the entire table at selection.

    Declaration
    public Task DeleteTableAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    EnforceProtectionAsync(String, ProtectionType)

    Enforce document protection by protection type.

    Declaration
    public Task EnforceProtectionAsync(string credential, ProtectionType protectionType)
    Parameters
    Type Name Description
    System.String credential

    Password string.

    ProtectionType protectionType

    Protection type to enforce, refer ProtectionType.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    IncreaseIndentAsync()

    Increases the left indent of selected paragraphs to a factor of 36 points.

    Declaration
    public Task IncreaseIndentAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertBookmarkAsync(String)

    Insert Bookmark at current selection range.

    Declaration
    public Task InsertBookmarkAsync(string name)
    Parameters
    Type Name Description
    System.String name

    Bookmark name.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertColumnAsync(Boolean, Nullable<Double>)

    Inserts the specified number of columns to the table left or right to the column at cursor position.

    Declaration
    public Task InsertColumnAsync(bool left = false, Nullable<double> count = null)
    Parameters
    Type Name Description
    System.Boolean left

    Insert new column in the left.

    System.Nullable<System.Double> count

    Number of columns to insert.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertColumnBreakAsync()

    Inserts a column break at cursor position.

    Declaration
    public Task InsertColumnBreakAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertCommentAsync(String)

    Insert comment to the current selected text.

    Declaration
    public Task InsertCommentAsync(string text = null)
    Parameters
    Type Name Description
    System.String text

    Comment to insert.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertEditingRegionAsync()

    Insert editing region where everyone can edit.

    Declaration
    public Task InsertEditingRegionAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertEndnoteAsync()

    Insert Endnote at current selection.

    Declaration
    public Task InsertEndnoteAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertFieldAsync(String, String)

    Inserts the specified field at cursor position.

    Declaration
    public Task InsertFieldAsync(string code, string result = null)
    Parameters
    Type Name Description
    System.String code

    Field string.

    System.String result

    Default result value for the field.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertFootnoteAsync()

    Insert Footnote at current selection.

    Declaration
    public Task InsertFootnoteAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertFormFieldAsync(FormFieldType)

    Insert specified form field at current selection.

    Declaration
    public Task InsertFormFieldAsync(FormFieldType type)
    Parameters
    Type Name Description
    FormFieldType type

    Form filed type to insert, refer FormFieldType.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertHyperlinkAsync(String, String)

    Insert hyperlink at current position.

    Declaration
    public Task InsertHyperlinkAsync(string address, string displayText = null)
    Parameters
    Type Name Description
    System.String address

    Hyperlink address.

    System.String displayText

    Hyperink display text.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertImageAsync(String, Nullable<Double>, Nullable<Double>)

    Inserts an image at the cursor position in the document.

    Declaration
    public Task InsertImageAsync(string imageString, Nullable<double> width = null, Nullable<double> height = null)
    Parameters
    Type Name Description
    System.String imageString

    The Base64-encoded string representing the image to be inserted.

    System.Nullable<System.Double> width

    The width of the image in pixels. If null, the image's original width will be used.

    System.Nullable<System.Double> height

    The height of the image in pixels. If null, the image's original height will be used.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task representing the asynchronous operation.

    InsertImageAsync(String, Nullable<Double>, Nullable<Double>, String)

    Inserts an image at the cursor position in the document.

    Declaration
    public Task InsertImageAsync(string imageString, Nullable<double> width = null, Nullable<double> height = null, string alternateText = null)
    Parameters
    Type Name Description
    System.String imageString

    The Base64-encoded string representing the image to be inserted.

    System.Nullable<System.Double> width

    The width of the image in pixels. If null, the image's original width will be used.

    System.Nullable<System.Double> height

    The height of the image in pixels. If null, the image's original height will be used.

    System.String alternateText

    The alternate text for the image. If null, no alternate text will be used.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task representing the asynchronous operation.

    InsertPageBreakAsync()

    Insert page break at cursor position.

    Declaration
    public Task InsertPageBreakAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertRowAsync(Boolean, Nullable<Double>)

    Inserts the specified number of rows to the table above or below to the row at cursor position.

    Declaration
    public Task InsertRowAsync(bool above = false, Nullable<double> count = null)
    Parameters
    Type Name Description
    System.Boolean above

    Insert the rows above.

    System.Nullable<System.Double> count

    Number of rows to insert.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertSectionBreakAsync()

    Inserts the section break of type new page at cursor position.

    Declaration
    public Task InsertSectionBreakAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertSectionBreakAsync(SectionBreakType)

    Inserts the section break at cursor position with specified section break type.

    Declaration
    public Task InsertSectionBreakAsync(SectionBreakType sectionBreakType)
    Parameters
    Type Name Description
    SectionBreakType sectionBreakType

    The section break type.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertTableAsync(Int32, Int32)

    Inserts a table at cursor position.

    Declaration
    public Task InsertTableAsync(int rows = 1, int columns = 1)
    Parameters
    Type Name Description
    System.Int32 rows

    Number of rows.

    System.Int32 columns

    Number of columns.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertTableOfContentsAsync(TableOfContentsSettings)

    Inserts, modifies or updates the table of contents based on given settings.

    Declaration
    public Task InsertTableOfContentsAsync(TableOfContentsSettings tableOfContentsSettings = null)
    Parameters
    Type Name Description
    TableOfContentsSettings tableOfContentsSettings

    Table of content settings, refer TableOfContentsSettings.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    InsertTextAsync(String)

    Inserts the specified text at cursor position.

    Declaration
    public Task InsertTextAsync(string text)
    Parameters
    Type Name Description
    System.String text

    Text to insert.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    MergeCellsAsync()

    Merge the selected cells.

    Declaration
    public Task MergeCellsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    PasteAsync(String, Nullable<PasteOptions>)

    Pastes provided sfdt content or the data present in local clipboard if any.

    Declaration
    public Task PasteAsync(string sfdt = null, Nullable<PasteOptions> defaultPasteOption = null)
    Parameters
    Type Name Description
    System.String sfdt

    SFDT string.

    System.Nullable<PasteOptions> defaultPasteOption

    Paste option, refer PasteOptions.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    RemoveHyperlinkAsync()

    Removes the hyperlink if selection is within hyperlink.

    Declaration
    public Task RemoveHyperlinkAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    SetFieldInfoAsync(FieldInfo)

    Sets the field information for the selected field.

    Declaration
    public Task SetFieldInfoAsync(FieldInfo fieldInfo)
    Parameters
    Type Name Description
    FieldInfo fieldInfo

    Specifies the field information, refer FieldInfo

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    Remarks

    Nested field gets replaced completely with the specified field information.

    StopProtectionAsync(String)

    Stop document protection.

    Declaration
    public Task StopProtectionAsync(string password)
    Parameters
    Type Name Description
    System.String password

    Password string.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleBaselineAlignmentAsync(BaselineAlignment)

    Toggles the baseline alignment property of selected contents.

    Declaration
    public Task ToggleBaselineAlignmentAsync(BaselineAlignment baseAlignment)
    Parameters
    Type Name Description
    BaselineAlignment baseAlignment

    Baseline alignment, refer BaselineAlignment.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleBoldAsync()

    Toggles the bold formatting of selected contents.

    Declaration
    public Task ToggleBoldAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleHighlightColorAsync(Nullable<HighlightColor>)

    Toggles the highlight color property of selected contents.

    Declaration
    public Task ToggleHighlightColorAsync(Nullable<HighlightColor> highlightColor = null)
    Parameters
    Type Name Description
    System.Nullable<HighlightColor> highlightColor

    Highlight color, refer HighlightColor.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleItalicAsync()

    Toggles the italic formatting of selected contents.

    Declaration
    public Task ToggleItalicAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleStrikethroughAsync(Nullable<Strikethrough>)

    Toggles the strike through formatting of selected contents.

    Declaration
    public Task ToggleStrikethroughAsync(Nullable<Strikethrough> strikethrough = null)
    Parameters
    Type Name Description
    System.Nullable<Strikethrough> strikethrough

    Strike through type, refer Strikethrough.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleSubscriptAsync()

    Toggles the subscript formatting of selected contents.

    Declaration
    public Task ToggleSubscriptAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleSuperscriptAsync()

    Toggles the superscript formatting of selected contents.

    Declaration
    public Task ToggleSuperscriptAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleTextAlignmentAsync(TextAlignment)

    Apply the text alignment of selected paragraphs.

    Declaration
    public Task ToggleTextAlignmentAsync(TextAlignment textAlignment)
    Parameters
    Type Name Description
    TextAlignment textAlignment

    Text alignment type, refer TextAlignment.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

    ToggleUnderlineAsync(Nullable<Underline>)

    Toggles the underline formatting of selected contents.

    Declaration
    public Task ToggleUnderlineAsync(Nullable<Underline> underline = null)
    Parameters
    Type Name Description
    System.Nullable<Underline> underline

    Underline type, refer Underline.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns an asynchronous operation.

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