Namespace: cq-scriptiq-editor

WebComponents. cq-scriptiq-editor

Studies web component <cq-scriptiq-editor>.

Only available if subscribing to the scriptIQ module.

This web component allows users to enter and edit ScriptIQ entries

To enable the scriptIQ plugin in sample-template-advanced.html , search for scriptiq and uncomment the necessary sections. This template can also be used as reference to create your own UI for this module.

Since:
  • 6.1.0

Members


constants

String constants for common use

Since:
  • 6.1.0

Methods


addScript( [scriptObj])

Compiles and adds the script to the studyScriptLibrary if successful. If not then error message is displayed

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)

Initialize the component and load the necessary libraries

Parameters:
Name Type Description
cb function

The callback to call when all the libraries have been loaded

Since:
  • 6.1.0
Example
//
		<cq-scriptiq-editor>
			<div class="stx-ico-handle" onmouseover="stxx.modalBegin();" onmouseout="stxx.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">&nbsp;</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>

open( [params])

Opens the scripting ui area

Parameters:
Name Type Argument Description
params object <optional>

The object that contains the saved script to fill in the scripting input area

Properties
Name Type Argument Description
source string <optional>

The ScriptIQ text

Since:
  • 6.1.0