Smart Document Editor

(part of package 'smartDocumentEditor') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent

This is a reference page; many components have detailed usage guides here.

Properties

dataProviderID

Type: dataprovider


editable

Type: protected Default Value: true


editorStyleSheet

Attach a style sheet to add or overwrite content styles used by the editor. Make sure to prefix all classes with the .ck-content class.

Type: media


language

Type: string Default Value: null


mentionFeeds

Type: mentionFeed[]


minHeight

Editor's min height. It's none by default. So when you want the height to be resposive and would like to have a min height for the editor, set responsiveHeight as 0 and this property with the value that fits your needs.

Type: int Default Value: null


overWriteTabForEditor

Type: boolean Default Value: true


responsiveHeight

Editor's height to be set in a responsive form. When responsiveHeight is set to 0, the editor will use 100% height of the parent container. When value is set to -1 it will be based on the content.

Type: int Default Value: 500


showInspector

Type: boolean Default Value: false


showToolbar

Type: boolean Default Value: true


styleClass

Type: styleclass


toolbarItems

Configure toolbar items

Type: toolbarItem[]


viewType

Type: string Default Value: "DOCUMENT"


visible

Type: visible


Events

onActionMethodID(event)

Parameters:


onDataChangeMethodID(oldValue,newValue,event)

@return {boolean}

Parameters:

Returns: {boolean}


onError(errorMessage,errorStack)

Parameters:


onFileUploadedMethodID(file)

Parameters:


onFocusGainedMethodID(event)

Parameters:


onFocusLostMethodID(event)

Parameters:


onReady()


API

addInputAtCursor(input)

Add input to current cursor position, will return false when in readOnly mode

Example:

elements.myElement.addInputAtCursor(input);

Parameters:

Returns: boolean


addTagAtCursor(marker,tag)

Add tag to current cursor position, will return false when in readOnly mode

Example:

elements.myElement.addTagAtCursor(tag);

Parameters:

Returns: boolean


create(config)

(Re-)Creates the editor using the given config

Example:

elements.myElement.create(config, onSuccess, onError);

Parameters:


createToolbarItem(name,onClick)

Returns a toolbarItem that can be provided as one of the toolbar items on a toolbar property of an editor's config

Example:

elements.myElement.createToolbarItem(name, onClick);

Parameters:

  • {string} name The (unique) name of this toolbar item

  • {function} onClick OnClick the callback method to fire when the item is clicked

Returns: toolbarItem


executeCommand(command,commandParameters)

Executes the specified command with given parameters.

Example:

elements.myElement.executeCommand(command, commandParameters);

Parameters:

  • {string} command The name of the command to execute

  • {object} [commandParameters] Optional command parameters


getCSSData(filterStylesheetName)

@return {string}

Parameters:

  • {string} [filterStylesheetName]

Returns: string


getHTMLData(withInlineCSS,filterStylesheetName)

@return {string}

Parameters:

Returns: string


getPrintCSSData()

@return {string}

Returns: string


insertImage(source)

Executes the specified command with given parameters.

Example:

elements.myElement.executeCommand(command, commandParameters);

@param {*} [commandParameters] optional command parameters

Parameters:

  • {string} source The name of the command to execute


isInPreviewMode()

Return if editor is in preview mode (CKEditor readOnly)

@public

Returns: boolean ** boolean


previewHTML(html,readOnly)

Preview Editor HTML data into the editor

@public

Parameters:

  • {string} html Html

  • {boolean} [readOnly] Set component into readOnly mode (default: true)


requestFocus()

Request the focus to this editor.

Example:

myElement.requestFocus();

saveData()

Force the autosave trigger of the editor to get all latest changes

Example:

dataprovider = elements.myElement.saveData();

Returns: object Data currently in the editor.


setMentionFeeds(mentionFeeds)

@param {Array<CustomType<smartdocumenteditor-smartdocumenteditor.mentionFeed>>} mentionFeeds @public

Parameters:


undoPreviewHTML(readOnly)

Undo Preview Editor HTML data into the editor

@public

Parameters:

  • {boolean} [readOnly] Set component into readOnly mode (default: false)


Types

mentionFeed

scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.mentionFeed>

mentionFeedItem

scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.mentionFeedItem>

toolbar

scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.toolbar>

toolbarItem

scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.toolbarItem>


Last updated