ITPETBQuestion

A descendant of ITPQuestion, representing an Editable Text Block Question on a form. Adds an iframe in which the editorPage page is loaded and handles callbacks from this page. No validation.

constructor

ITPETBQuestion

Trivial

public methods

-

overrides

initialise(pCallback, pSuppressImmediateCallback)

Call ancestors initialise method, suppressing callbacks.

initScreenElements()

Replaces the trivial input element by an iframe in which the editorPage is loaded. Registers the text block with the global text block manager, which is of the class ITPETBManager, defined in the same JavaScript file. Stores a reference to the window in which the editorPage is loaded.

prepareForSubmission(pCallback)

Triggers a save of the text block in the editor window, which will eventually result in a callback to setFinalValue.

other methods

getInitialValue()

Returns the value of the text block before editing.

setFinalValue(pValue)

Callback function for saving of a text block. Writes its post value to the hidden input element and reports readyForSubmission to its parent.

windowInitialised()

Callback function, which is called from the editorPage as soon as the TinyMCE editor has been initialized. Invokes editing of the text block in the editor.

textblockLoaded()

Callback function, which is called from the text block manager when the text block has been loaded. This means that the question has been fully initialized, and the object will report that by invoking its initialization callback.