Skip to main content
NiCE KnowledgeKnowledge
NiCE Knowledge Success Center

Definitions and Operators in DekiScript

Applies to:
All versions
Role required:
Draft Contributor
Commonly used DekiScript definitions and operators help you customize your content.

DekiScript definitions

Comment

//<text> 

The key to writing good code is to leave comments, notes to yourself and to other coders that explain your code and underlying decisions. Comments do not affect code functionality. Use two forward slashes // to comment out text that is not to be displayed.

//This is a comment

Try it on a page:

  1. Open a page in Edit mode.
  2. Copy the code.
  3. Click Save.

You will see: [nothing, since comments can only be seen in the editor].

Text

"<text>"

Anything between quotation marks is a string of text.

"This is text"

Try it on a page:

  1. Open a page in Edit mode.
  2. Copy the code.
  3. Click Save.

You will see:  This is text

Hyperlink

<a href="http://www.hyperlink.com">"Text for your hyperlink"</a>

In DekiScript, hyperlinks are created the same way they are created in HTML. Place the URL between quotation marks after the href, and the text that you want to link to between quotation marks before the </a> tag.

<a href="http://www.mindtouch.com">"MindTouch"</a>

Try it on a page:

  1. Open a page in Edit mode.
  2. Copy the code.
  3. Click Save.

You will see:  MindTouch

Concatenate

"..x.."

Two periods before and after a variable connects the variable's value to the text before and after it.

var x=5;
var y=6;
""..x..""..y..""

Try it on a page:

  1. Open a page in Edit mode.
  2. Copy the code.
  3. Click Save.

You will see:

56

Line break

<br/>

A line break pushes the text that follows it to the next line.

"Today you are learning DekiScript.";<br/>
"Don't forget to put a semicolon after the text and before the line break.";

Try it on a page:

  1. Open a page in Edit mode.
  2. Copy the code.
  3. Click Save.

You will see:

Today you are learning DekiScript.
Don't forget to put a semicolon after the text and before the line break.

Line space

<br/><br/>

A line space adds a blank line after your text. It does what pressing the enter key twice would do. 

"Today you are learning DekiScript.";<br/><br/>
"Don't forget to put a semicolon after the text and before the line break or line space.";

Try it on a page:

  1. Open a page in Edit mode.
  2. Copy the code.
  3. Click Save.

You will see:

Today you are learning DekiScript.

Don't forget to put a semicolon after the text and before the line break or line space.

DekiScript operators

Operator Description
= sets something
== compares things
&& and
|| or
!= does not
() allows DekiScript in HTML
  • Was this article helpful?