Enables scripted content fragments to render and interact with a content editor supporting immediate submission.
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_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 |
Return Type
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.
Usage
#set($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 |
Return Type
string
GetBookmarkScript
Gets a Javascript script that, when executed, saves the current cursor location within an editor
Usage
#set($stringResponse = $core_v2_submittableEditor.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_submittableEditor.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_submittableEditor.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_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 |
Return Type
string
GetMoveScript
Gets a Javascript script that, when executed, moves the editor
Usage
#set($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 |
Return Type
string
GetUpdateContentScript
Gets a Javascript script that, when executed, replaces the content of an editor
Usage
#set($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 |
Return Type
string
Render
Renders a rich text editor
Usage
#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}"))
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 | bool | 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 | bool | 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 |
Return Type
string