Class Index | File Index

Classes


Class orion.mirror.Mirror

A shim for CodeMirror's CodeMirror API.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/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:
<a href="http://codemirror.net/manual.html">http://codemirror.net/manual.html
Method Detail
{Object} copyState(mode, state)
Parameters:
{Object} mode
{Object} state
Returns:
{Object} A copy of state.
See:
<a href="http://codemirror.net/doc/manual.html#modeapi">http://codemirror.net/doc/manual.html#modeapi

defineMIME(mime, modeSpec)
Parameters:
{String} mime
{String|Object} modeSpec
See:
<a href="http://codemirror.net/manual.html#option_mode">http://codemirror.net/manual.html#option_mode

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

{Object} getMode(modeSpec, modeSpec)
Parameters:
{String|Object} modeSpec
modeSpec
Returns:
{Object}
See:
<a href="http://codemirror.net/manual.html#option_mode">http://codemirror.net/manual.html#option_mode

{Object} getOption(option)
Parameters:
option
Returns:
{Object}
See:
<a href="http://codemirror.net/doc/manual.html#getOption">http://codemirror.net/doc/manual.html#getOption

{String[]} listMIMEs()
Returns:
{String[]} The MIMEs.
See:
<a href="http://codemirror.net/doc/manual.html#option_mode">http://codemirror.net/doc/manual.html#option_mode

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

setOption(option, value)
Parameters:
{String} option
{Object} value
See:
<a href="http://codemirror.net/doc/manual.html#getOption">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 Thu Jun 29 2017 14:37:22 GMT-0400 (EDT)