Enables scripted content fragments to render and interact with the configured content editor.

Methods

GetAttachOnChangeScript

Gets a Javascript script that, when executed, registers a javascript function to be executed when an editor's content changes

Usage

#set($stringResponse = $core_v2_editor.GetAttachOnChangeScript($id, $function))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringID of the editorRequired
functionstringJavascript function to be executed when the editor's content changesRequired

Return Type

string

GetBookmarkScript

Gets a Javascript script that, when executed, saves the current cursor location within an editor

Usage

#set($stringResponse = $core_v2_editor.GetBookmarkScript($id))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringID of the editorRequired

Return Type

string

GetContentScript

Gets a Javascript script that, when executed, returns the contents of an editor

Usage

#set($stringResponse = $core_v2_editor.GetContentScript($id))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringID of the editorRequired

Return Type

string

GetFocusScript

Gets a Javascript script that, when executed, sets the focus on an editor

Usage

#set($stringResponse = $core_v2_editor.GetFocusScript($id))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringID of the editorRequired

Return Type

string

GetInsertContentScript

Gets a Javascript script that, when executed, inserts HTML into the current cursor location within an editor

Usage

#set($stringResponse = $core_v2_editor.GetInsertContentScript($id, $contentVariableName))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringID of the editorRequired
contentVariableNamestringJavascript variable name containing the HTML to insertRequired

Return Type

string

GetUpdateContentScript

Gets a Javascript script that, when executed, replaces the content of an editor

Usage

#set($stringResponse = $core_v2_editor.GetUpdateContentScript($id, $contentVariableName))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringID of the editorRequired
contentVariableNamestringJavascript variable name containing the HTML to assign to the editorRequired

Return Type

string

Render

Renders a rich text editor

Usage

#set($stringResponse = $core_v2_editor.Render($id))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringId to apply to the editor in order to reference it laterRequired

Return Type

string

Render

Renders a rich text editor

Usage

#set($stringResponse = $core_v2_editor.Render($id, "%{ContentTypeId = $contentTypeIdArg, Height = $heightArg, Value = $valueArg, Width = $widthArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idstringId to apply to the editor in order to reference it laterRequired
ContentTypeIdGuidIdentifier of the type of content being editedOptional
HeightstringHeight of the editor (CSS unit)Optional
ValuestringHTML value of the editorOptional
WidthstringWidth of the editor (CSS unit)Optional

Return Type

string