Search results

DocumentEditorComponent

Represents the Essential JS 2 VueJS Document Editor Component

<ejs-documenteditor id='container'></ejs-documenteditor>

Properties

acceptTab

boolean

Gets or Sets a value indicating whether tab key can be accepted as input or not.

Defaults to false

contextMenu

ContextMenu

Gets the context menu object of the document editor.

currentUser

string

Current User

Defaults to

defaultPasteOption

string

Default Paste Formatting Options

Defaults to KeepSourceFormatting

documentEditorSettings

DocumentEditorSettingsModel

Defines the settings for DocumentEditor customization.

Defaults to {}

documentName

string

Gets or sets the name of the document.

Defaults to

editor

Editor

Gets the editor object of the document editor.

Defaults to undefined

editorHistory

EditorHistory

Gets the editor history object of the document editor.

enableBookmarkDialog

boolean

Gets or sets a value indicating whether bookmark dialog is enabled or not.

Defaults to false

enableBordersAndShadingDialog

boolean

Gets or sets a value indicating whether borders and shading dialog is enabled or not.

Defaults to false

enableComment

boolean

Gets or set a value indicating whether comment is enabled or not

Defaults to false

enableContextMenu

boolean

Gets or sets a value indicating whether context menu is enabled or not.

Defaults to false

enableCursorOnReadOnly

boolean

Gets or sets a value indicating whether to enable cursor in document editor on read only state or not. The default value is false.

Defaults to false

enableEditor

boolean

Gets or sets a value indicating whether editor needs to be enabled or not.

Defaults to false

enableEditorHistory

boolean

Gets or sets a value indicating whether editor history needs to be enabled or not.

Defaults to false

enableFontDialog

boolean

Gets or sets a value indicating whether font dialog is enabled or not.

Defaults to false

enableFormField

boolean

Gets or set a value indicating whether form fields is enabled or not.

Defaults to false

enableHyperlinkDialog

boolean

Gets or sets a value indicating whether hyperlink dialog is enabled or not.

Defaults to false

enableImageResizer

boolean

Gets or sets a value indicating whether image resizer is enabled or not.

Defaults to false

enableListDialog

boolean

Gets or sets a value indicating whether list dialog is enabled or not.

Defaults to false

enableLocalPaste

boolean

Gets or sets a value indicating whether local paste needs to be enabled or not.

Defaults to false

enableOptionsPane

boolean

Gets or sets a value indicating whether options pane is enabled or not.

Defaults to false

enablePageSetupDialog

boolean

Gets or sets a value indicating whether margin dialog is enabled or not.

Defaults to false

enableParagraphDialog

boolean

Gets or sets a value indicating whether paragraph dialog is enabled or not.

Defaults to false

enablePersistence

boolean

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

Defaults to false

enablePrint

boolean

Gets or sets a value indicating whether print needs to be enabled or not.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

enableSearch

boolean

Gets or sets a value indicating whether search module is enabled or not.

Defaults to false

enableSelection

boolean

Gets or sets a value indicating whether selection needs to be enabled or not.

Defaults to false

enableSfdtExport

boolean

Gets or sets a value indicating whether Sfdt export needs to be enabled or not.

Defaults to false

enableSpellCheck

boolean

Gets or sets a value indicating whether editor need to be spell checked.

Defaults to false

enableStyleDialog

boolean

Gets or sets a value indicating whether font dialog is enabled or not.

Defaults to false

enableTableDialog

boolean

Gets or sets a value indicating whether table dialog is enabled or not.

Defaults to false

enableTableOfContentsDialog

boolean

Gets or sets a value indicating whether table of contents dialog is enabled or not.

Defaults to false

enableTableOptionsDialog

boolean

Gets or sets a value indicating whether table options dialog is enabled or not.

Defaults to false

enableTablePropertiesDialog

boolean

Gets or sets a value indicating whether table properties dialog is enabled or not.

Defaults to false

enableTextExport

boolean

Gets or sets a value indicating whether text export needs to be enabled or not.

Defaults to false

enableTrackChanges

boolean

Gets or set a value indicating whether track changes is enabled or not

Defaults to false

enableWordExport

boolean

Gets or sets a value indicating whether word export needs to be enabled or not.

Defaults to false

headers

any[]

Add custom headers to XMLHttpRequest.

Defaults to []

height

string

Defines the height of the DocumentEditor component

Defaults to ‘200px’

isReadOnly

boolean

Gets or sets a value indicating whether the document editor is in read only state or not.

Defaults to true

layoutType

string

Layout Type

Defaults to Pages

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

pageCount

number

Gets the total number of pages.

pageGap

number

Gets or sets the page gap value in document editor

Defaults to 20

pageOutline

string

Gets or sets the page outline color.

Defaults to ‘#000000’

revisions

RevisionCollection

Gets the revision collection which contains information about changes made from original document

Gets the search object of the document editor.

selection

Selection

Gets the selection object of the document editor.

Defaults to undefined

serverActionSettings

ServerActionSettingsModel

Defines the settings of the DocumentEditor services

serviceUrl

string

Sfdt Service URL

Defaults to

showComments

boolean

Show comment in the document.

Defaults to false

showRevisions

boolean

Shows revision changes in the document.

Defaults to false

spellCheckDialog

SpellCheckDialog

Gets the spell check dialog object of the document editor.

spellChecker

SpellChecker

Gets the spell check object of the document editor.

Gets or Sets a value indicating whether holding Ctrl key is required to follow hyperlink on click. The default value is true.

Defaults to true

userColor

string

User Selection Highlight Color

Defaults to ‘#FFFF00’

width

string

Defines the width of the DocumentEditor component

Defaults to ‘100%’

zIndex

number

Specifies the z-order for rendering that determines whether the dialog is displayed in front or behind of another component.

Defaults to 2000

zoomFactor

number

Gets or sets the zoom factor in document editor.

Defaults to 1

Methods

destroy

Destroys all managed resources used by this object.

Returns void

enableAllModules

Enables all the modules.

Returns void

exportFormData

Export form field values.

Returns FormFieldData[]

fitPage

Fits the page based on given fit type.

Returns void

focusIn

Shifts the focus to the document.

Returns void

getBookmarks

Gets the bookmarks.

Returns string[]

getFormFieldInfo

Get form field by name

Parameter Type Description
name string Form field name.

Returns TextFormFieldInfo | CheckBoxFormFieldInfo | DropDownFormFieldInfo

getFormFieldNames

Get all form field names.

Returns string[]

getStyleNames

Gets the style names based on given style type.

Parameter Type Description
styleType (optional) string

Returns string[]

getStyles

Gets the style objects on given style type.

Parameter Type Description
styleType (optional) string

Returns Object[]

importFormData

Import form field values.

Returns void

open

Opens the given Sfdt text.

Returns void

openBlank

Opens a blank document.

Returns void

print

Prints the document.

Returns void

resetFormFields

Reset form field value to default.

Parameter Type Description
name (optional) string specify form field name

Returns void

resize

Resizes the component and its sub elements based on given size or container size.

Returns void

save

Saves the document.

Returns void

saveAsBlob

Saves the document as blob.

Parameter Type Description
formatType (optional) string

Returns Promise

scrollToPage

Scrolls view to start of the given page number if exists.

Returns boolean

serialize

Serialize the data to JSON string.

Returns string

setDefaultCharacterFormat

Set the default character format for document editor

Parameter Type Description
characterFormat CharacterFormatProperties

Returns void

setDefaultParagraphFormat

Set the default paragraph format for document editor

Parameter Type Description
paragraphFormat ParagraphFormatProperties

Returns void

setDefaultSectionFormat

Set the default section format for document editor

Parameter Type Description
sectionFormat SectionFormatProperties

Returns void

setFormFieldInfo

Set form field.

Parameter Type Description
name string Form field name.
formFieldInfo TextFormFieldInfo | CheckBoxFormFieldInfo | DropDownFormFieldInfo Form Field info

Returns void

showDialog

Shows the dialog.

Returns void

showOptionsPane

Shows the options pane.

Returns void

showRestrictEditingPane

Shows the restrict editing pane.

Returns void

updateFields

Updated fields in document. Currently cross reference field only supported.

Returns void

Events

afterFormFieldFill

EmitType<FormFieldFillEventArgs>

Triggers after form field fill.

beforeFileOpen

EmitType<BeforeFileOpenArgs>

Triggers before a file is opened.

beforeFormFieldFill

EmitType<FormFieldFillEventArgs>

Triggers before form field fill.

beforePaneSwitch

EmitType<BeforePaneSwitchEventArgs>

Triggers before opening comment pane.

commentBegin

EmitType<Object>

Triggers after inserting comment.

commentDelete

EmitType<CommentDeleteEventArgs>

Triggers after inserting comment.

commentEnd

EmitType<Object>

Triggers after posting comment.

contentChange

EmitType<ContentChangeEventArgs>

Triggers whenever content changes in the document editor.

created

EmitType<Object>

Triggers when the component is created

customContextMenuBeforeOpen

EmitType<BeforeOpenCloseCustomContentMenuEventArgs>

Triggers before opening the custom context-menu option.

customContextMenuSelect

EmitType<CustomContentMenuEventArgs>

Triggers while selecting the custom context-menu option.

destroyed

EmitType<Object>

Triggers when the component is destroyed.

documentChange

EmitType<DocumentChangeEventArgs>

Triggers whenever document changes in the document editor.

keyDown

EmitType<DocumentEditorKeyDownEventArgs>

Triggers whenever key is pressed in the document editor.

requestNavigate

EmitType<RequestNavigateEventArgs>

Triggers whenever hyperlink is clicked or tapped in the document editor.

searchResultsChange

EmitType<SearchResultsChangeEventArgs>

Triggers whenever search results changes in the document editor.

selectionChange

EmitType<SelectionChangeEventArgs>

Triggers whenever selection changes in the document editor.

serviceFailure

EmitType<ServiceFailureArgs>

Triggers when the server side action fails.

trackChange

EmitType<TrackChangeEventArgs>

Triggers when TrackChanges enabled / disabled.

viewChange

EmitType<ViewChangeEventArgs>

Triggers whenever container view changes in the document editor.

zoomFactorChange

EmitType<ZoomFactorChangeEventArgs>

Triggers whenever zoom factor changes in the document editor.

Contents
Contents