Enables scripted content fragments to render and interact with the configured content editor.
- GetAttachOnChangeScript
- GetAttachOnReadyScript
- GetBookmarkScript
- GetContentScript
- GetContextScript
- GetFocusScript
- GetInsertContentScript
- GetRemoveScript
- GetUpdateContentScript
- Render
- SetContextScript
Methods
GetAttachOnChangeScript
Gets a Javascript script that, when executed, registers a javascript function to be executed when an editor's content changes
Velocity
#set($stringResponse = $core_v2_editor.GetAttachOnChangeScript($id, $function))
JavaScript
var 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 |
Returns
String
GetAttachOnReadyScript
Gets a Javascript script that, when executed, registers a javascript function to be executed when an editor is initialized.
Velocity
#set($stringResponse = $core_v2_editor.GetAttachOnReadyScript($id, $function))
JavaScript
var stringResponse = core_v2_editor.GetAttachOnReadyScript(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 is initialized | Required |
Returns
String
GetBookmarkScript
Gets a Javascript script that, when executed, saves the current cursor location within an editor
Velocity
#set($stringResponse = $core_v2_editor.GetBookmarkScript($id))
JavaScript
var stringResponse = core_v2_editor.GetBookmarkScript(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | ID of the editor | Required |
Returns
String
GetContentScript
Gets a Javascript script that, when executed, returns the contents of an editor
Velocity
#set($stringResponse = $core_v2_editor.GetContentScript($id))
JavaScript
var stringResponse = core_v2_editor.GetContentScript(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | ID of the editor | Required |
Returns
String
GetContextScript
Gets a Javascript script that, when executed, returns the current context identifier for the editor.
Velocity
#set($stringResponse = $core_v2_editor.GetContextScript($id))
JavaScript
var stringResponse = core_v2_editor.GetContextScript(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | Id | Required |
Returns
String
GetFocusScript
Gets a Javascript script that, when executed, sets the focus on an editor
Velocity
#set($stringResponse = $core_v2_editor.GetFocusScript($id))
JavaScript
var stringResponse = core_v2_editor.GetFocusScript(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | ID of the editor | Required |
Returns
String
GetInsertContentScript
Gets a Javascript script that, when executed, inserts HTML into the current cursor location within an editor
Velocity
#set($stringResponse = $core_v2_editor.GetInsertContentScript($id, $contentVariableName))
JavaScript
var 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 |
Returns
String
GetRemoveScript
Gets a Javascript script that, when executed, removes the editor.
Velocity
#set($stringResponse = $core_v2_editor.GetRemoveScript($id))
JavaScript
var stringResponse = core_v2_editor.GetRemoveScript(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | Id | Required |
Returns
String
GetUpdateContentScript
Gets a Javascript script that, when executed, replaces the content of an editor
Velocity
#set($stringResponse = $core_v2_editor.GetUpdateContentScript($id, $contentVariableName))
JavaScript
var 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 |
Returns
String
Render
Render Overload 1
Renders a rich text editor
Velocity
#set($stringResponse = $core_v2_editor.Render($id))
JavaScript
var 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 |
Render Overload 2
Renders a rich text editor
Velocity
#set($stringResponse = $core_v2_editor.Render($id, "%{ ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, ContentTypeId = $contentTypeIdArg, Height = $heightArg, Value = $valueArg, Width = $widthArg }"))
JavaScript
var stringResponse = core_v2_editor.Render(id, { ApplicationId: applicationIdArg, ApplicationTypeId: applicationTypeIdArg, 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 | ||
options | Options | Set of optional parameters including: | Required | ||
ApplicationId | Guid | Identifier of the application in which content is being edited | Optional | ||
ApplicationTypeId | Guid | Identifier of the type of application in which content is being edited | Optional | ||
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 |
Returns
String
SetContextScript
Gets a Javascript script that, when executed, sets the context identifier for the editor. When changed, the content of the editor is cleared or the last backup of content for the new context identifier is restored.
Velocity
#set($stringResponse = $core_v2_editor.SetContextScript($id, $contextIdVariableName))
JavaScript
var stringResponse = core_v2_editor.SetContextScript(id, contextIdVariableName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | Id | Required | ||
contextIdVariableName | String | Context Id Variable Name | Required |
Returns
String