The ScriptIQ web component <cq-scriptiq-editor>
, which enables you to create ScriptIQ scripts.
Only available with the ScriptIQ module.
To enable the ScriptIQ plug-in in sample-template-advanced.html, search for "scriptiq" and uncomment the necessary sections. The template can also be used as a reference to create your own UI for ScriptIQ.
- Since:
-
6.1.0
Example
<cq-scriptiq-editor>
<div
class="stx-ico-handle"
onmouseover="this.parentNode.modalBegin();"
onmouseout="this.parentNode.modalEnd();"
>
<span class=""></span>
</div>
<div class="scriptiq-toolbar">
<div stxtap="addScript()" class="ciq-btn">
Apply
</div>
<div stxtap="clear()" class="ciq-btn">
Clear
</div>
<div class="stx-btn stx-ico" stxtap="close()">
<span class="stx-ico-close"> </span>
</div>
</div>
<div class="scriptiq-textarea">
<textarea placeholder="Click to add script"></textarea>
</div>
<div class="scriptiq-status">
<input readonly placeholder="Script status"></input>
</div>
</cq-scriptiq-editor>
Members
-
constants
-
String constants for common use.
- Since:
-
6.1.0
Methods
-
addScript( [scriptObj])
-
Compiles the script, and if compilation is successful, adds the script to the study library. If compilation is unsuccessful, displays an error message.
Parameters:
Name Type Argument Description scriptObj
object <optional>
An object that contains the values to save to storage.
Properties
Name Type Argument Description script
object <optional>
The ScriptIQ source from storage.
siqList
object <optional>
Boolean flag to determine whether the script needs to be listed on the custom study menu; defaults to true.
- Since:
-
6.1.0
-
clear()
-
Clears the scripting input boxes.
- Since:
-
6.1.0
-
close()
-
Closes the scripting UI area.
- Since:
-
6.1.0
-
initialize(cb)
-
Initializes the component and loads the necessary libraries.
Parameters:
Name Type Description cb
function The callback to call when all the libraries have been loaded.
- Since:
-
6.1.0
-
open( [params])
-
Opens the scripting UI area. Sets the
cq-active
attribute to true; for example,<cq-scriptiq-editor cq-active="true">
.Parameters:
Name Type Argument Description params
object <optional>
The object that contains the saved script which fills in the scripting input area.
Properties
Name Type Argument Description source
string <optional>
The ScriptIQ text.
- Since:
-
6.1.0