Enables scripted content fragments to render and interact with a content editor supporting immediate submission.
- GetAttachOnChangeScript
- GetAttachOnKeyDownScript
- GetAttachOnReadyScript
- GetBookmarkScript
- GetContentScript
- GetFocusScript
- GetInsertContentScript
- GetMoveScript
- 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_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
String
GetAttachOnKeyDownScript
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
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_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
String
GetBookmarkScript
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
String
GetContentScript
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
String
GetFocusScript
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
String
GetInsertContentScript
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
String
GetMoveScript
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
String
GetUpdateContentScript
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
String
Render
Renders a rich text editor
Velocity
#set($stringResponse = $core_v2_submittableEditor.Render($id, $submitFunction, "%{ AfterHtml = $afterHtmlArg, 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, 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 | ||
AfterHtml | String | HTML to rneder after the submit UI in the editor. | 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
String