lt.objs.editor
+line-class
(+line-class e lh plane class)
->cm-ed
(->cm-ed e)
Return editor's CodeMirror object
->cursor
(->cursor e & [side])
Same as cursor but returned as cljs map
->elem
(->elem e)
Return DOM element of editor's CodeMirror object
->generation
(->generation e)
->token-type
(->token-type e pos)
->val
(->val e)
Return editor's CodeMirror object buffer contents
-line-class
(-line-class e lh plane class)
add-gutter
(add-gutter e class-name width)
adjust-loc
(adjust-loc loc dir)
(adjust-loc loc dir axis)
bookmark
(bookmark e from widg)
center-cursor
(center-cursor ed)
char-coords
(char-coords e pos)
clear-history
(clear-history e)
cursor
(cursor e)
(cursor e side)
Return cursor of editor's CodeMirror object as js object.
Example: #js {:line 144, :ch 9}
extension
(extension name func)
find-marks
(find-marks e pos)
fold-code
(fold-code e)
(fold-code e loc)
get-char
(get-char ed dir)
get-history
(get-history e)
indent-line
(indent-line e l dir)
indent-lines
(indent-lines e from to dir)
indent-selection
(indent-selection e dir)
inner-mode
(inner-mode e)
(inner-mode e state)
insert-at-cursor
(insert-at-cursor ed s)
line-handle
(line-handle e l)
line-length
(line-length e l)
mark
(mark e from to opts)
mode-blacklist
Modes to not load on startup
move-cursor
(move-cursor ed pos)
off
(off ed ev func)
Remove event handler on editor's CodeMirror object
on
(on ed ev func)
Register event handler on editor's CodeMirror object
on-change
(on-change e func)
on-click
(on-click e func)
on-update
(on-update e func)
operation
(operation e func)
option
(option e o)
Return value for option name on editor's CodeMirror object
pos->index
(pos->index e pos)
remove-gutter
(remove-gutter e class-name)
replace
(replace e from v)
(replace e from to v)
replace-selection
(replace-selection e neue & [after])
selection-bounds
(selection-bounds e)
set-extending
(set-extending e ext?)
set-history
(set-history e v)
set-line
(set-line e l text)
set-options
(set-options e m)
Given a map of options, set each pair as an option on editor's
CodeMirror object
set-selection
(set-selection e start end)
set-val
(set-val e v)
Set content value of editor's CodeMirror object. Cursor position is lost
set-val-and-keep-cursor
(set-val-and-keep-cursor e v)
Same as set-val but current cursor position is kept
show-hints
(show-hints e hint-fn options)