Class Index | File Index

Classes


Class orion.mirror.Mirror

A shim for CodeMirror's CodeMirror API.
Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
A Mirror is a partial implementation of the API provided by the CodeMirror object.
Method Summary
Method Attributes Method Name and Description
 
copyState(mode, state)
 
defineMIME(mime, modeSpec)
 
defineMode(name, modeFactory)
 
getMode(modeSpec, modeSpec)
 
getOption(option)
 
 
 
setOption(option, value)
 
startState(mode, basecolumn)
Alias for mode.startState().
Class Detail
orion.mirror.Mirror()
A Mirror is a partial implementation of the API provided by the CodeMirror object. Mirror provides functionality related to mode and MIME management.

If clients intend to reuse modes provided by CodeMirror without modification, they must expose a Mirror as a property named "CodeMirror" of the global object so that modes may access it to register themselves, and to load other modes. For example:

<script>
window.CodeMirror = new Mirror();
// Now you can load the CodeMirror mode scripts.
</script>

See:
http://codemirror.net/manual.html
Method Detail
{Object} copyState(mode, state)
Parameters:
{Object} mode
{Object} state
Returns:
{Object} A copy of state.
See:
http://codemirror.net/doc/manual.html#modeapi

defineMIME(mime, modeSpec)
Parameters:
{String} mime
{String|Object} modeSpec
See:
http://codemirror.net/manual.html#option_mode

defineMode(name, modeFactory)
Parameters:
{String} name
{Function(options|config)} modeFactory
See:
http://codemirror.net/doc/manual.html#modeapi

{Object} getMode(modeSpec, modeSpec)
Parameters:
{String|Object} modeSpec
modeSpec
Returns:
{Object}
See:
http://codemirror.net/manual.html#option_mode

{Object} getOption(option)
Parameters:
option
Returns:
{Object}
See:
http://codemirror.net/doc/manual.html#getOption

{String[]} listMIMEs()
Returns:
{String[]} The MIMEs.
See:
http://codemirror.net/doc/manual.html#option_mode

{String[]} listModes()
Returns:
{String[]} The mode names.
See:
http://codemirror.net/doc/manual.html#option_mode

setOption(option, value)
Parameters:
{String} option
{Object} value
See:
http://codemirror.net/doc/manual.html#getOption

{Object} startState(mode, basecolumn)
Alias for mode.startState().
Parameters:
{Object} mode
{Number?} basecolumn
Returns:
{Object} The start state returned by mode.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Apr 01 2014 22:58:24 GMT-0400 (EDT)