Search results

Editor API in Angular DocumentEditor API component

Editor module

Methods

applyBorders

Applies the borders based on given settings.

Parameter Type Description
settings BorderSettings Specify the border settings to be applied.

Returns void

applyBullet

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

applyContinueNumbering

Applies the continue numbering from the previous list.

Returns void

applyNumbering

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) string Default value of ‘listLevelPattern’ parameter is ListLevelPattern.Arabic

Returns void

applyStyle

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

autoFitTable

Fits the table based on AutoFitType.

Parameter Type Description
fitType string Specify the auto fit type.

Returns void

canMergeCells

Determines whether the merge cell operation can be done.

Returns boolean

clearElementRevision

Clears the specified revision from the document.

Parameter Type Description
revision Revision Specify the revision to clear from the document.

Returns void

clearFormatting

Clears the formatting.

Returns void

clearList

Clears the list format for selected paragraphs.

Returns void

createStyle

Creates a new instance of the Style class with the specified style name.

Returns void

cut

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

Returns void

decreaseIndent

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

Returns void

delete

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

Returns void

deleteAllComments

Deletes all the comments in the current document.

Returns void

deleteBookmark

Deletes the specified bookmark in the current document.

Parameter Type Description
bookmarkName string Specify the name of bookmark to be deleted.

Returns void

deleteColumn

Deletes the selected column(s).

Returns void

deleteComment

Deletes the current selected comment.

Returns void

deleteRow

Deletes the selected row(s).

Returns void

deleteTable

Deletes the entire table at selection.

Returns void

enforceProtection

Enforces the document protection by protection type.

Parameter Type Description
credential string Specify the credential to protect the document.
protectionType string Specify the document protection type.

Returns void

enforceProtection

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

increaseIndent

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

Returns void

insertBookmark

Inserts the specified bookmark at the current selection range.

Parameter Type Description
name string Specify the name of bookmark to be inserted.

Returns void

insertColumn

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

insertColumnBreak

Inserts a column break at cursor position.

Returns void

insertComment

Inserts the comment.

Parameter Type Description
text (optional) string Specify the comment text to be inserted.

Returns void

insertEditingRegion

Inserts the editing region where everyone can edit.

Returns void

insertEditingRegion

Inserts the editing region where mentioned user can edit.

Parameter Type Description
user string Specifies the native rendering

Returns void

insertEndnote

Inserts the endnote at the current selection

Returns void

insertField

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

insertFootnote

Inserts the footnote at the current selection.

Returns void

insertFormField

Inserts the specified form field at the current selection.

Parameter Type Description
type string 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

insertImage

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.

Returns void

insertPageBreak

Inserts the page break at the cursor position.

Returns void

insertPageNumber

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

insertRow

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

insertSectionBreak

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

Parameter Type Description
sectionBreakType (optional) SectionBreakType Specifies the section break type.
> If this parameter is not set, it inserts the section break of type new page.

Returns void

insertTable

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

insertTableOfContents

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

insertText

Inserts the specified text at cursor position

Parameter Type Description
text string Specify the text to insert.

Returns void

mergeCells

Merges the selected cells.

Returns void

paste

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) string Specifies the paste options.

Returns void

Removes the hyperlink if selection is within hyperlink.

Returns void

removeRevision

Removes the specified revision from the document.

Parameter Type Description
revisionToRemove Revision Specify the revision to be removed.

Returns any

retrieveFieldResultantText

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

setFieldInfo

Sets the field information for the selected field.

Parameter Type Description
fieldInfo FieldInfo – Specifies the field information.

Returns void

stopProtection

Stops the document protection.

Parameter Type Description
password string Specify the password to stop protection.

Returns void

toggleAllCaps

Toggles the all Caps formatting for the selected content.

Returns void

toggleBaselineAlignment

Toggles the baseline alignment property of selected contents.

Parameter Type Description
baseAlignment string Specifies the baseline alignment.

Returns void

toggleBold

Toggles the bold property of selected contents.

Returns void

toggleHighlightColor

Toggles the highlight color property of selected contents.

Parameter Type Description
highlightColor (optional) string Specify the highlight color to be applied (default: Yellow).

Returns void

toggleItalic

Toggles the bold property of selected contents.

Returns void

toggleStrikethrough

Toggles the strike through property of selected contents.

Parameter Type Description
strikethrough (optional) string Specify the strike through to be toggled (default: SingleStrike).

Returns void

toggleSubscript

Toggles the subscript formatting of selected contents.

Returns void

toggleSuperscript

Toggles the superscript formatting of selected contents.

Returns void

toggleTextAlignment

Toggles the text alignment of selected paragraphs.

Parameter Type Description
textAlignment string Specifies the text alignment.

Returns void

toggleUnderline

Toggles the underline property of selected contents.

Parameter Type Description
underline (optional) string Specify the underline to be toggled (default: Single).

Returns void