Editor module
Applies the borders based on given settings.
Parameter | Type | Description |
---|---|---|
settings | BorderSettings |
Specify the border settings to be applied. |
Returns void
Applies the bullet list to selected paragraphs.
Parameter | Type | Description |
---|---|---|
bullet | string |
Specify the bullet character to be applied. |
fontFamily | string |
Specify the bullet font family name. |
Returns void
Applies the continue numbering from the previous list.
Returns void
Applies the numbering list to selected paragraphs.
Parameter | Type | Description |
---|---|---|
numberFormat | string |
“%n” representations in ‘numberFormat’ parameter will be replaced by respective list level’s value.“%1)” will be displayed as “1)” |
listLevelPattern (optional) | ListLevelPattern |
Default value of ‘listLevelPattern’ parameter is ListLevelPattern.Arabic |
Returns void
Applies the specified style for paragraph.
Parameter | Type | Description |
---|---|---|
style | string |
Specify the style name to apply. |
clearDirectFormatting (optional) | boolean |
Removes manual formatting (formatting not applied using a style) from the selected text, to match the formatting of the applied style. Default value is false. |
Returns void
Fits the table based on AutoFitType.
Parameter | Type | Description |
---|---|---|
fitType | AutoFitType |
Specify the auto fit type. |
Returns void
Determines whether the merge cell operation can be done.
Returns boolean
Clears the specified revision from the document.
Parameter | Type | Description |
---|---|---|
revision | Revision |
Specify the revision to clear from the document. |
Returns void
Clears the formatting.
Returns void
Clears the list format for selected paragraphs.
Returns void
Creates a new style or modifies an existing style with the specified style properties.
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. If no style exists with same name, it creates a new style.
Parameter | Type | Description |
---|---|---|
styleString | string |
The style properties. |
modifyExistingStyle (optional) | boolean |
The Boolean value denotes whether to modify the properties in the existing style or create a new style. |
Returns string
Moves the selected content in the document editor control to clipboard.
Returns void
Decreases the left indent of selected paragraphs to a factor of 36 points.
Returns void
Removes the current selected content or one character right of the cursor.
Returns void
Deletes all the comments in the current document.
Returns void
Deletes the specified bookmark in the current document.
Parameter | Type | Description |
---|---|---|
bookmarkName | string |
Specify the name of bookmark to be deleted. |
Returns void
Deletes the selected column(s).
Returns void
Deletes the specified comment. If the provided id corresponds to a parent comment, the entire comment along with its replies will be deleted. If the provided id corresponds to a single reply comment, only that particular reply will be deleted.
Returns void
Deletes the selected row(s).
Returns void
Deletes the entire table at selection.
Returns void
Enforces the document protection by protection type.
Parameter | Type | Description |
---|---|---|
credential | string |
Specify the credential to protect the document. |
protectionType | ProtectionType |
Specify the document protection type. |
Returns void
Enforces the document protection with the specified credential.
Parameter | Type | Description |
---|---|---|
credential | string |
Specify the credential to protect the document. |
limitToFormatting | boolean |
True if to limit the document formatting; Otherwise, false. |
isReadOnly | boolean |
True if to allow read-only access to the document; Otherwise, false. |
Returns void
Enforces the document protection with the specified protection type.
Parameter | Type | Description |
---|---|---|
credential | string |
Specify the credential to protect the document. |
protectionType | ProtectionType |
Specify the document protection type. |
Returns Promise
Enforces the document protection with the specified credential.
Parameter | Type | Description |
---|---|---|
credential | string |
Specify the credential to protect the document. |
limitToFormatting | boolean |
True if to limit the document formatting; Otherwise, false. |
isReadOnly | boolean |
True if to allow read-only access to the document; Otherwise, false. |
Returns Promise
Increases the left indent of selected paragraphs to a factor of 36 points.
Returns void
Inserts the specified bookmark at the current selection range.
Parameter | Type | Description |
---|---|---|
name | string |
Specify the name of bookmark to be inserted. |
Returns void
Inserts the specified number of columns to the table left or right to the column at cursor position.
Parameter | Type | Description |
---|---|---|
left (optional) | boolean |
The left parameter is optional and if omitted, it takes the value as false and inserts to the right of column at cursor position. |
count (optional) | number |
The count parameter is optional and if omitted, it takes the value as 1. |
Returns void
Inserts a column break at cursor position.
Returns void
Inserts the comment.
Parameter | Type | Description |
---|---|---|
text (optional) | string |
Specify the comment text to be inserted. |
Returns void
Inserts a comment with the specified properties.
Parameter | Type | Description |
---|---|---|
text | string |
Specify the comment text to be inserted. |
commentProperties | CommentProperties |
The properties of the comment (author, isResolved, dateTime). |
Returns Comment
Inserts a content control.
Returns ContentControlInfo
Inserts a content control.
Returns ContentControlInfo
Inserts a content control.
Returns ContentControlInfo
Inserts a content control with the specified content control properties.
Parameter | Type | Description |
---|---|---|
info | ContentControlInfo |
The content control information specifying the properties of the content control to insert |
Returns ContentControlInfo
Inserts the editing region where everyone can edit.
Returns void
Inserts the editing region where mentioned user can edit.
Parameter | Type | Description |
---|---|---|
user | string |
Specifies the native rendering |
Returns void
Inserts the endnote at the current selection
Returns void
Inserts the specified field at cursor position.
Parameter | Type | Description |
---|---|---|
code | string |
Specify the field code. |
result (optional) | string |
Specify the field result. |
Returns void
Inserts the footnote at the current selection.
Returns void
Inserts the specified form field at the current selection.
Parameter | Type | Description |
---|---|---|
type | FormFieldType |
Specify the Form field type to insert. |
Returns void
Inserts the Hyperlink.
Parameter | Type | Description |
---|---|---|
address | string |
Specify the Hyperlink URL to be inserted. |
displayText (optional) | string |
Specify the display text for the hyperlink |
screenTip (optional) | string |
Specify the screen tip text. |
Returns void
Inserts the image with specified size at cursor position in the document editor.
Parameter | Type | Description |
---|---|---|
imageString | string |
Base64 string, web URL or file URL. |
width (optional) | number |
Specify the image width. |
height (optional) | number |
Specify the image height. |
alternateText (optional) | string |
Specify the image alternateText. |
Returns void
Inserts an image with a specified size at the cursor position in the DocumentEditor component.
Parameter | Type | Description |
---|---|---|
imageString | string |
The Base64 string, web URL, or file URL of the image to be inserted. |
width (optional) | number |
The width of the image. Optional parameter, if not specified, the original width of the image will be used. |
height (optional) | number |
The height of the image. Optional parameter, if not specified, the original height of the image will be used. |
alternateText (optional) | string |
The alternate text of the image. Optional parameter, if specified, this text will be displayed when the image is not available or when images are disabled in the document. |
Returns Promise
Inserts the page break at the cursor position.
Returns void
Inserts the page number in the current cursor position.
Parameter | Type | Description |
---|---|---|
numberFormat (optional) | string |
Optional switch that overrides the numeral style of the page number. |
Returns void
Inserts a reply to a comment.
Parameter | Type | Description |
---|---|---|
id | string |
The unique identifier of the comment to reply to. |
text | string |
The text of the reply. |
commentProperties | CommentProperties |
The properties of the reply (author, isResolved, dateTime). |
Returns Comment
Inserts the specified number of rows to the table above or below to the row at cursor position.
Parameter | Type | Description |
---|---|---|
above (optional) | boolean |
The above parameter is optional and if omitted, it takes the value as false and inserts below the row at cursor position. |
count (optional) | number |
The count parameter is optional and if omitted, it takes the value as 1. |
Returns void
Inserts the section break at cursor position with specified section break type.
Returns void
Inserts a table of specified size at cursor position in the document editor.
Parameter | Type | Description |
---|---|---|
rows (optional) | number |
Default value of ‘rows’ parameter is 1. |
columns (optional) | number |
Default value of ‘columns’ parameter is 1. |
Returns void
Inserts, modifies or updates the table of contents based on given settings.
Parameter | Type | Description |
---|---|---|
tableOfContentsSettings (optional) | TableOfContentsSettings |
Specify the table of content settings to be inserted. |
Returns void
Inserts the specified text at cursor position
Parameter | Type | Description |
---|---|---|
text | string |
Specify the text to insert. |
Returns void
Merges the selected cells.
Returns void
Pastes the provided content into the editor.
Returns void
Pastes the provided sfdt content or the data present in local clipboard if any.
Parameter | Type | Description |
---|---|---|
sfdt (optional) | string |
Specifies the sfdt content to paste at current position. |
defaultPasteOption (optional) | PasteOptions |
Specifies the paste options. |
Returns void
Removes the hyperlink if selection is within hyperlink.
Returns void
Removes the specified revision from the document.
Parameter | Type | Description |
---|---|---|
revisionToRemove | Revision |
Specify the revision to be removed. |
Returns any
Retrieves the resultant field text from the specified field element box.
Parameter | Type | Description |
---|---|---|
item | FieldElementBox |
Specify the field element box to retrieve field text. |
Returns string
Sets the existing content control within the editor using the provided information.
The content control is identified by its unique combination of title
and tag
.
If a content control with the specified title
and tag
is found, it will be updated with the new information.
Returns ContentControlInfo
Sets the field information for the selected field.
Parameter | Type | Description |
---|---|---|
fieldInfo | FieldInfo |
– Specifies the field information. |
Returns void
Stops the document protection.
Parameter | Type | Description |
---|---|---|
password | string |
Specify the password to stop protection. |
Returns void
Stops the document protection.
Parameter | Type | Description |
---|---|---|
password | string |
Specify the password to stop protection. |
Returns Promise
Toggles the all Caps formatting for the selected content.
Returns void
Toggles the baseline alignment property of selected contents.
Parameter | Type | Description |
---|---|---|
baseAlignment | BaselineAlignment |
Specifies the baseline alignment. |
Returns void
Toggles the bold property of selected contents.
Returns void
Toggles the highlight color property of selected contents.
Parameter | Type | Description |
---|---|---|
highlightColor (optional) | HighlightColor |
Specify the highlight color to be applied (default: Yellow). |
Returns void
Toggles the bold property of selected contents.
Returns void
Toggles the strike through property of selected contents.
Parameter | Type | Description |
---|---|---|
strikethrough (optional) | Strikethrough |
Specify the strike through to be toggled (default: SingleStrike). |
Returns void
Toggles the subscript formatting of selected contents.
Returns void
Toggles the superscript formatting of selected contents.
Returns void
Toggles the text alignment of selected paragraphs.
Parameter | Type | Description |
---|---|---|
textAlignment | TextAlignment |
Specifies the text alignment. |
Returns void
Toggles the underline property of selected contents.
Parameter | Type | Description |
---|---|---|
underline (optional) | Underline |
Specify the underline to be toggled (default: Single). |
Returns void
private
Returns CellInfo