new CodeMirrorExt(el, options)codeMirrorExt.jsline 21
Class CodeMirrorExt
PARAMETERS
Name Type Description el
HTMLElement
container jquery element
options
Object = {}
codeMirror options
Instance Methods
addWidget(selection, node, style, offset)codeMirrorExt.jsline 148
Add widget
PARAMETERS
Name Type Description selection
object
Selection object
node
HTMLElement
Widget node
style
string
Adding style "over" or "bottom"
offset
number
Adding offset
blur()codeMirrorExt.jsline 85
blur focus to current Editor
focus()codeMirrorExt.jsline 78
Set focus to current Editor
getCaretPosition()codeMirrorExt.jsline 137
Get current caret position
RETURNS:
{Object
}
getCurrentRange()codeMirrorExt.jsline 64
getCurrentRange
RETURNS:
{Object
} - selection range
getCursor(start)codeMirrorExt.jsline 235
get code mirror cursor
PARAMETERS
Name Type Description start
string = 'head'
which end of the selection. 'from'|'to'|'head'|'anchor'
RETURNS:
{Cursor
} - code mirror cursor
getEditor()codeMirrorExt.jsline 122
Get CodeMirror instance
RETURNS:
{CodeMirror
}
getRange()codeMirrorExt.jsline 276
Get start, end position of current selection
RETURNS:
{Object
}
getValue()codeMirrorExt.jsline 114
Get editor value
RETURNS:
{string
} - codeMirror text value
getWrapperElement()codeMirrorExt.jsline 226
get code mirror wrapper element
RETURNS:
{HTMLElement
} - code mirror wrapper element
moveCursorToEnd()codeMirrorExt.jsline 242
Set cursor position to end
moveCursorToStart()codeMirrorExt.jsline 252
Set cursor position to start
off(type, func)codeMirrorExt.jsline 306
remove codemirror event handler
PARAMETERS
Name Type Description type
string
event type
func
function
handler function
on(type, func)codeMirrorExt.jsline 297
add codemirror event handler
PARAMETERS
Name Type Description type
string
event type
func
function
handler function
remove()codeMirrorExt.jsline 92
Remove Editor from document
replaceRelativeOffset(content, offset, overwriteLength)codeMirrorExt.jsline 176
Replace selection with replacement content and offset
PARAMETERS
Name Type Description content
string
Replacement content text
offset
number
Offset
overwriteLength
number
Length to overwrite
replaceSelection(content, selection)codeMirrorExt.jsline 161
Replace selection with given replacement content
PARAMETERS
Name Type Description content
string
Replacement content text
selection
object
Selection object
reset()codeMirrorExt.jsline 129
Reset Editor
scrollTop(value)codeMirrorExt.jsline 264
Scroll Editor content to Top
PARAMETERS
Name Type Description value
number
Scroll amount
RETURNS:
{number
} - changed scroll top
setHeight(height)codeMirrorExt.jsline 196
Set Editor height
PARAMETERS
Name Type Description height
number
Editor height
setMinHeight(minHeight)codeMirrorExt.jsline 206
set min height
PARAMETERS
Name Type Description minHeight
number
min height
setPlaceholder(placeholder)codeMirrorExt.jsline 216
Set the placeholder to CodeMirror
PARAMETERS
Name Type Description placeholder
string
placeholder to set
setValue(markdown, cursorToEnd)codeMirrorExt.jsline 101
Set Editor value
PARAMETERS
Name Type Description markdown
string
Markdown syntax text
cursorToEnd
boolean = true
move cursor to contents end