Enables scripted content fragments to render and interact with a content editor supporting immediate submission.
- GetAttachOnChangeScript
- GetAttachOnKeyDownScript
- GetAttachOnReadyScript
- GetBookmarkScript
- GetContentScript
- GetContextScript
- GetFocusScript
- GetInsertContentScript
- GetMoveScript
- 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_submittableEditor.GetAttachOnChangeScript($id, $function))
JavaScript
var stringResponse = core_v2_submittableEditor.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
StringGetAttachOnKeyDownScript
Gets a Javascript script that, when executed, registers a javascript function to be executed when an editor's content changes. The function is provided the browser event object to inspect/cancel the keystroke.
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetAttachOnKeyDownScript($id, $function))
JavaScript
var stringResponse = core_v2_submittableEditor.GetAttachOnKeyDownScript(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
StringGetAttachOnReadyScript
Gets a Javascript script that, when executed, registers a javascript function to be executed when an editor is initialized.
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetAttachOnReadyScript($id, $function))
JavaScript
var stringResponse = core_v2_submittableEditor.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
StringGetBookmarkScript
Gets a Javascript script that, when executed, saves the current cursor location within an editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetBookmarkScript($id))
JavaScript
var stringResponse = core_v2_submittableEditor.GetBookmarkScript(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | String | ID of the editor | Required |
Returns
StringGetContentScript
Gets a Javascript script that, when executed, returns the contents of an editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetContentScript($id))
JavaScript
var stringResponse = core_v2_submittableEditor.GetContentScript(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | String | ID of the editor | Required |
Returns
StringGetContextScript
Gets a Javascript script that, when executed, returns the current context identifier for the editor.
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetContextScript($id))
JavaScript
var stringResponse = core_v2_submittableEditor.GetContextScript(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | String | Id | Required |
Returns
StringGetFocusScript
Gets a Javascript script that, when executed, sets the focus on an editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetFocusScript($id))
JavaScript
var stringResponse = core_v2_submittableEditor.GetFocusScript(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | String | ID of the editor | Required |
Returns
StringGetInsertContentScript
Gets a Javascript script that, when executed, inserts HTML into the current cursor location within an editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetInsertContentScript($id, $contentVariableName))
JavaScript
var stringResponse = core_v2_submittableEditor.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
StringGetMoveScript
Gets a Javascript script that, when executed, moves the editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetMoveScript($id, $target))
JavaScript
var stringResponse = core_v2_submittableEditor.GetMoveScript(id, target);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | String | ID of the editor | Required | ||
| target | String | Javascript variable name containing the selector or DOM element to move the editor to | Required |
Returns
StringGetRemoveScript
Gets a Javascript script that, when executed, removes the editor.
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetRemoveScript($id))
JavaScript
var stringResponse = core_v2_submittableEditor.GetRemoveScript(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | String | Id | Required |
Returns
StringGetUpdateContentScript
Gets a Javascript script that, when executed, replaces the content of an editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.GetUpdateContentScript($id, $contentVariableName))
JavaScript
var stringResponse = core_v2_submittableEditor.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
StringRender
Renders a rich text editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.Render($id, $submitFunction, "%{ AfterHtml = $afterHtmlArg, ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, AutoResize = $autoResizeArg, BeforeHtml = $beforeHtmlArg, ContentTypeId = $contentTypeIdArg, EnableEnterToSubmitToggle = $enableEnterToSubmitToggleArg, EnterToSubmitPrompt = $enterToSubmitPromptArg, Height = $heightArg, Placeholder = $placeholderArg, SubmitLabel = $submitLabelArg, Value = $valueArg, Width = $widthArg }"))JavaScript
var stringResponse = core_v2_submittableEditor.Render(id, submitFunction, { AfterHtml: afterHtmlArg, ApplicationId: applicationIdArg, ApplicationTypeId: applicationTypeIdArg, AutoResize: autoResizeArg, BeforeHtml: beforeHtmlArg, ContentTypeId: contentTypeIdArg, EnableEnterToSubmitToggle: enableEnterToSubmitToggleArg, EnterToSubmitPrompt: enterToSubmitPromptArg, Height: heightArg, Placeholder: placeholderArg, SubmitLabel: submitLabelArg, 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 | ||
| submitFunction | String | Javascript function to be executed when the editor's content changes | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| AfterHtml | String | HTML to rneder after the submit UI in the editor. | Optional | ||
| 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 | ||
| AutoResize | Boolean | Enables the editor to autoresize in height. | Optional | True | |
| BeforeHtml | String | HTML to render before the submit UI in the editor. | Optional | ||
| ContentTypeId | Guid | Identifier of the type of content being edited | Optional | ||
| EnableEnterToSubmitToggle | Boolean | Enables toggling enter to submit, if enabled by the site. | Optional | True | |
| EnterToSubmitPrompt | String | Text label to enable enter to submit | Optional | ||
| Height | String | Height of the editor (CSS unit) | Optional | ||
| Placeholder | String | Placeholder text rendered within the editor when blurred and without a value. | Optional | ||
| SubmitLabel | String | Explicit submission button label | Optional | ||
| Value | String | HTML value of the editor | Optional | ||
| Width | String | Width of the editor (CSS unit) | Optional |
Returns
StringSetContextScript
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_submittableEditor.SetContextScript($id, $contextIdVariableName))
JavaScript
var stringResponse = core_v2_submittableEditor.SetContextScript(id, contextIdVariableName);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | String | Id | Required | ||
| contextIdVariableName | String | Context Id Variable Name | Required |
Returns
String