Sets the focus to the editor view.
TODO: Problem: we cannot avoid automatic screen keyboard pop-ups on Android
-> deactivate mechanism, because it does not work
Parameters
OptionaldisableKeyboard: boolean = false
true switches the screen keyboard off
Returns void
getCursor
getCursor(): any
Queries the cursor position.
Returns any
cursor position in old code mirror 5 format
getSelection
getSelection(): string
Queries and returns the current selection.
Returns string
the current selection string
getValue
getValue(): string
Returns the whole content of the document.
Returns string
the document content
lastLine
lastLine(): number
Returns the number of the last line (zero based)
Returns number
number of the last line (TODO: CHECK)
makeEditable
makeEditable(editable): void
Parameters
editable: boolean
Returns void
on
on(_evt, handler): void
Sets a single event handler for 'change' events.
Parameters
_evt: string
handler: any
Returns void
refresh
refresh(): void
Not implemented.
Returns void
replaceRange
replaceRange(replacement, from, to, _origin?): void
Replaces a range in the given document.
TODO: adapt to Code Mirror 5 format (from, to)
Parameters
replacement: string
replacement string
from: any
begin of range
to: any
end of range
Optional_origin: string
Returns void
replaceSelection
replaceSelection(b): void
Replaces the selection in the editor with the given string.
Parameters
b: string
string to be inserted
Returns void
setCursor
setCursor(cursor): void
Sets the cursor.
Parameters
cursor: any
cursor position in old code mirror 5 format
-1 is used to position on end.
Returns void
setOption
setOption(option, val): void
Sets an option. Only 'theme' is supported.
Parameters
option: string
val: any
Returns void
setValue
setValue(val): void
Sets the content of the whole editor area.
Parameters
val: string | ArrayBuffer
new editor content
Returns void
touchEventHandler
touchEventHandler(event): void
Experience:
The touch events do not arrive, if the Editor is set to be not editable.
The mechanism is not working this way.
Proxy class implements the ICodeMirror interface