WTUI Docs

WTUI  1.0.0

WTUI Docs > WTUI > WTUI.CodeControl
Search:
 
Filters

Class WTUI.CodeControl

An editor for XML code

Tag

<wtui:control type="WTUI.CodeControl"/>

The tag for WTUI.CodeControl

Example:

<wtui:control type="WTUI.CodeControl" id="exampleid" />
Parameters:
id <String> (optional) The id of the button
name <String> (optional) The name of the control if it is used within a form

Methods

clearHistory

void clearHistory ( )

Clear the undo history for the control

Returns: void

fixIndentation

void fixIndentation ( )

Fix indentation of the code in the control

Returns: void

getValue

String getValue ( )

Get the value

Returns: String
The value

setValue

void setValue ( value )

Set the value

Parameters:
value <String> The value
Returns: void

Events

change

change ( change )

This event is fired when change is made

Example:

WTUI('codeid').on('change', function(changes) {
});
Parameters:
change <String} a {from, to, text, next> object containing information about the changes that occurred

WTUI