Enables scripted content fragments to render and interact with the configured content editor.
- GetAttachOnChangeScript
- GetAttachOnReadyScript
- GetBookmarkScript
- GetContentScript
- GetFocusScript
- GetInsertContentScript
- GetUpdateContentScript
- Render
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
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
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, "%{ ContentTypeId = $contentTypeIdArg, Height = $heightArg, Value = $valueArg, Width = $widthArg }"))
JavaScript
var 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 |
Returns
String