Api Reference
getValue([from, to])
Arguments :
Name
Type
Default
from
Number
optional
to
Number
optional
Return : String
setValue(text[, recordHistory])
Arguments :
Name
Type
Default
value
String
required
recordHistory
Boolean
true
optional
this method will replace current value with new value
getOptions()
Return : Object
setOptions(options)
Arguments :
Name
Type
Default
options
Object
required
getSelection()
Return : Object { start, end, dir }
setSelection(start, end[, dir])
Arguments :
Name
Type
Default
start
Number
required
end
Number
required
dir
String
"none"
optional
getCursor()
Return : Number
setCursor(pos)
Arguments :
Name
Type
Default
pos
Number
required
getActiveLine()
Return : Number
getTotalLine()
Return : Number
getLineValue(line)
Arguments :
Name
Type
Default
line
Number
required
Return : String
insertTab()
insertText(from, text[, options])
Arguments :
Name
Type
Default
from
Number
required
to
Number
required
options
Object
optional
options properties :
Name
Type
Default
Accept Value
moveCursor
Number
recordHistory
String
"after"
"before" | "after" | "both" | "none"
removeText(from, to[, options])
Arguments :
Name
Type
Default
from
Number
required
to
Number
required
options
Object
optional
options properties :
Name
Type
Default
Accept Value
moveCursor
Number
recordHistory
String
"after"
"before" | "after" | "both" | "none"
undo()
redo()
Last updated
Was this helpful?