Class EditorModule
Represents the editor module in DocumentEditor.
Inheritance
Namespace: Syncfusion.Blazor.DocumentEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class EditorModule : Object
Constructors
EditorModule(BaseComponent)
Default constructor for ContextMenu.
Declaration
public EditorModule(BaseComponent baseComponent)
Parameters
Type | Name | Description |
---|---|---|
BaseComponent | baseComponent | An DocumentEdiorComponent instance. |
Properties
DocumentEditorComponent
DocumentEdiorComponent instance.
Declaration
protected BaseComponent DocumentEditorComponent { get; set; }
Property Value
Type | Description |
---|---|
BaseComponent |
Methods
ApplyBorders(BorderSettings)
Applies the borders based on given settings.
Declaration
public Task ApplyBorders(BorderSettings settings)
Parameters
Type | Name | Description |
---|---|---|
BorderSettings | settings | An BorderSettings instance. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ApplyBullet(String, String)
Applies the bullet list to selected paragraphs.
Declaration
public Task ApplyBullet(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. |
ApplyNumbering(String, Nullable<ListLevelPattern>)
Applies the numbering list to selected paragraphs.
Declaration
public Task ApplyNumbering(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. |
ApplyPasteOptions(PasteOptions)
Apply the paste option.
Declaration
public Task ApplyPasteOptions(PasteOptions options)
Parameters
Type | Name | Description |
---|---|---|
PasteOptions | options | Paste option, refer PasteOptions. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ApplyStyle(String, Nullable<Boolean>)
Apply style for paragraph.
Declaration
public Task ApplyStyle(string style, Nullable<bool> clearDirectFormatting = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | style | Style name to be applied. |
System.Nullable<System.Boolean> | clearDirectFormatting | Clear the existing formats for the selected text. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
AutoFitTable(AutoFitType)
Apply auto fit type for the table.
Declaration
public Task AutoFitTable(AutoFitType fitType)
Parameters
Type | Name | Description |
---|---|---|
AutoFitType | fitType | Auto fit type, refer AutoFitType |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
CanMergeCells()
Check if the merge cell operation can be done.
Declaration
public Task<bool> CanMergeCells()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | Returns an asynchronous operation of boolean type. |
ClearFormatting()
Clears the formatting.
Declaration
public Task ClearFormatting()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ClearList()
Clears the list format for selected paragraphs.
Declaration
public Task ClearList()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
CreateStyle(String)
Creates a new instance of Style.
Declaration
public Task CreateStyle(string styleString)
Parameters
Type | Name | Description |
---|---|---|
System.String | styleString | Style string. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
Cut()
Moves the selected content in the document editor control to clipboard.
Declaration
public Task Cut()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
DecreaseIndent()
Decreases the left indent of selected paragraphs to a factor of 36 points.
Declaration
public Task DecreaseIndent()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
Delete()
Remove the current selected content or one character right of cursor.
Declaration
public Task Delete()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
DeleteAllComments()
Delete all the comments in current document.
Declaration
public Task DeleteAllComments()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
DeleteColumn()
Deletes the selected column(s).
Declaration
public Task DeleteColumn()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
DeleteComment()
Delete current selected comment.
Declaration
public Task DeleteComment()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
DeleteRow()
Deletes the selected row(s).
Declaration
public Task DeleteRow()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
DeleteTable()
Deletes the entire table at selection.
Declaration
public Task DeleteTable()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
EnforceProtection(String, ProtectionType)
Enforce document protection by protection type.
Declaration
public Task EnforceProtection(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. |
IncreaseIndent()
Increases the left indent of selected paragraphs to a factor of 36 points.
Declaration
public Task IncreaseIndent()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertBookmark(String)
Insert Bookmark at current selection range
Declaration
public Task InsertBookmark(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Bookmark name. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertColumn(Nullable<Boolean>, Nullable<Double>)
Inserts the specified number of columns to the table left or right to the column at cursor position.
Declaration
public Task InsertColumn(Nullable<bool> left = null, Nullable<double> count = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<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. |
InsertComment(String)
Insert comment to the current selected text.
Declaration
public Task InsertComment(string text = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Comment to insert. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertEditingRegion()
Insert editing region where everyone can edit.
Declaration
public Task InsertEditingRegion()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertEndnote()
Insert Endnote at current selection.
Declaration
public Task InsertEndnote()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
InsertField(String, String)
Inserts the specified field at cursor position.
Declaration
public Task InsertField(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. |
InsertFootnote()
Insert Footnote at current selection.
Declaration
public Task InsertFootnote()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
InsertFormField(FormFieldType)
Insert specified form field at current selection.
Declaration
public Task InsertFormField(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. |
InsertHyperlink(String, String)
Insert hyperlink at current position.
Declaration
public Task InsertHyperlink(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. |
InsertImage(String, Nullable<Double>, Nullable<Double>)
Inserts the image at cursor position.
Declaration
public Task InsertImage(string imageString, Nullable<double> width = null, Nullable<double> height = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | imageString | Base64 image string. |
System.Nullable<System.Double> | width | Width of the image. |
System.Nullable<System.Double> | height | Height of the image. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertPageBreak()
Insert page break at cursor position
Declaration
public Task InsertPageBreak()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertRow(Nullable<Boolean>, Nullable<Double>)
Inserts the specified number of rows to the table above or below to the row at cursor position.
Declaration
public Task InsertRow(Nullable<bool> above = null, Nullable<double> count = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<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. |
InsertSectionBreak()
Insert Section break at cursor position.
Declaration
public Task InsertSectionBreak()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertTable(Nullable<Double>, Nullable<Double>)
Inserts a table at cursor position.
Declaration
public Task InsertTable(Nullable<double> rows = null, Nullable<double> columns = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Double> | rows | Number of rows. |
System.Nullable<System.Double> | columns | Number of columns. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
InsertTableOfContents(TableOfContentsSettings)
Inserts, modifies or updates the table of contents based on given settings.
Declaration
public Task InsertTableOfContents(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. |
InsertText(String)
Inserts the specified text at cursor position.
Declaration
public Task InsertText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text to insert. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
MergeCells()
Merge the selected cells.
Declaration
public Task MergeCells()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
Paste(String, Nullable<PasteOptions>)
Pastes provided sfdt content or the data present in local clipboard if any.
Declaration
public Task Paste(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. |
RemoveHyperlink()
Removes the hyperlink if selection is within hyperlink.
Declaration
public Task RemoveHyperlink()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
StopProtection(String)
Stop document protection.
Declaration
public Task StopProtection(string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | password | Password string. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ToggleBaselineAlignment(BaselineAlignment)
Toggles the baseline alignment property of selected contents.
Declaration
public Task ToggleBaselineAlignment(BaselineAlignment baseAlignment)
Parameters
Type | Name | Description |
---|---|---|
BaselineAlignment | baseAlignment | Baseline alignment, refer BaselineAlignment. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ToggleBold()
Toggles the bold formatting of selected contents.
Declaration
public Task ToggleBold()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ToggleHighlightColor(Nullable<HighlightColor>)
Toggles the highlight color property of selected contents.
Declaration
public Task ToggleHighlightColor(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. |
ToggleItalic()
Toggles the italic formatting of selected contents.
Declaration
public Task ToggleItalic()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ToggleStrikethrough(Nullable<Strikethrough>)
Toggles the strike through formatting of selected contents.
Declaration
public Task ToggleStrikethrough(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. |
ToggleSubscript()
Toggles the subscript formatting of selected contents.
Declaration
public Task ToggleSubscript()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ToggleSuperscript()
Toggles the superscript formatting of selected contents.
Declaration
public Task ToggleSuperscript()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ToggleTextAlignment(TextAlignment)
Apply the text alignment of selected paragraphs.
Declaration
public Task ToggleTextAlignment(TextAlignment textAlignment)
Parameters
Type | Name | Description |
---|---|---|
TextAlignment | textAlignment | Text alignment type, refer TextAlignment. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns an asynchronous operation. |
ToggleUnderline(Nullable<Underline>)
Toggles the underline formatting of selected contents.
Declaration
public Task ToggleUnderline(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. |