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
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | ID of the editor | Required | ||
function | string | Javascript function to be executed when the editor's content changes | Required |
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
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | ID of the editor | Required |
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
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | ID of the editor | Required |
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
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | ID of the editor | Required |
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
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | ID of the editor | Required | ||
contentVariableName | string | Javascript variable name containing the HTML to insert | Required |
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
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | ID of the editor | Required | ||
contentVariableName | string | Javascript variable name containing the HTML to assign to the editor | Required |
Return Type
string
Render
Renders a rich text editor
Usage
#set($stringResponse = $core_v2_editor.Render($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | Id to apply to the editor in order to reference it later | Required |
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
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | string | Id to apply to the editor in order to reference it later | Required | ||
ContentTypeId | Guid | Identifier of the type of content being edited | Optional | ||
Height | string | Height of the editor (CSS unit) | Optional | ||
Value | string | HTML value of the editor | Optional | ||
Width | string | Width of the editor (CSS unit) | Optional |
Return Type
string