Class: CodeEditorPresenter

CodeEditorPresenter(root, onChange, onAutoRefresh)

new CodeEditorPresenter(root, onChange, onAutoRefresh)

Creates a new CodeEditorPresenter instance
Parameters:
Name Type Description
root HTMLElement The root element containing the editor.
onChange function Callback function triggered when editor content changes.
onAutoRefresh function Optional callback function for auto-refresh after AUTORUN_WAIT milliseconds of no changes.
Source:

Methods

forceUpdate()

Force a redraw of the editor. Force a redraw of the editor, pushing the request into the event queue.
Source:

getCode() → {string}

Gets the current code in the editor.
Source:
Returns:
The current editor content.
Type
string

hideError()

Hides the error display
Source:

setCode(code)

Sets new code content in the editor
Parameters:
Name Type Description
code string The code to set in the editor.
Source:

showError(error)

Display an error message.
Parameters:
Name Type Description
error string The error message to display.
Source: