TIWCGJSCodeMirrorConfig Class

CodeMiror Options class

Namespace: IWCGJSCodeMirror
TCGIndexedCollectionItem
  IWCGJQCommon.TIWCGJSon
    IWCGJSCodeMirror.TIWCGJSCodeMirrorConfig
type
 TIWCGJSCodeMirrorConfig = class(TIWCGJSon)
 end;

The TIWCGJSCodeMirrorConfig type exposes the following members.

Show:
 NameDescription
Create(TCollection)

Initializes a new instance of the TIWCGJSon class. (Inherited from TIWCGJSon.)

CreateSingle(TPersistent,string)

Initializes a new instance of the TIWCGJSon class. (Inherited from TIWCGJSon.)

Top
Show:
 NameDescription
AutoClearEmptyLines

When turned on (default is off), this will clear automatically clear lines consisting only of whitespace when the cursor leaves them. This is mostly useful to prevent auto indentation from introducing trailing whitespace in a file.

CGJSContainer

Represents property CGJSContainer. (Inherited from TIWCGJSon.)

ClassData

Represents property ClassData. (Inherited from TIWCGJSon.)

CodeMirror

Represents property CodeMirror.

ElectricChars

Configures whether the editor should re-indent the current line when a character is typed that might change its proper indentation (only works if the mode supports indentation). Default is true.

ExtraKeys

Can be used to specify extra keybindings for the editor, alongside the ones defined by keyMap. Should be either null, or a valid keymap value.

FirstLineNumber

At which number to start counting lines. Default is 1.

FixedGutter

When enabled (off by default), this will make the gutter stay visible when the document is scrolled horizontally.

Gutter

Can be used to force a 'gutter' (empty space on the left of the editor) to be shown even when no line numbers are active. This is useful for setting markers.

IndentUnit

How many spaces a block (whatever that means in the edited language) should be indented. The default is 2.

IndentWithTabs

Whether, when indenting, the first N*tabSize spaces should be replaced by N tabs. Default is false.

InstList

Represents property InstList. (Inherited from TIWCGJSon.)

IsStored

Represents property IsStored. (Inherited from TIWCGJSon.)

JSon

Return the Interface of SuperObject (ISuperObject) (Inherited from TIWCGJSon.)

JSonEvents[string]

Represents property JSonEvents[string]. (Inherited from TIWCGJSon.)

KeyMap

Configures the keymap to use. The default is "default", which is the only keymap defined in codemirror.js itself. Extra keymaps are found in the keymap directory. See the section on keymaps for more information.

LineNumbers

Whether to show line numbers to the left of the editor.

LineWrapping

Whether CodeMirror should scroll or wrap for long lines. Defaults to false (scroll).

List

Represents property List. (Inherited from TIWCGJSon.)

MatchBrackets

Determines whether brackets are matched whenever the cursor is moved next to a bracket.

MemberList

Represents property MemberList. (Inherited from TIWCGJSon.)

Mode

The mode to use. When not given, this will default to the first mode that was loaded. It may be a string, which either simply names the mode or is a MIME type associated with the mode. Alternatively, it may be an object containing configuration options for the mode, with a name property that names the mode (for example {name: "javascript", json: true}). The demo pages for each mode contain information about what configuration parameters the mode supports. You can ask CodeMirror which modes and MIME types are loaded with the CodeMirror.listModes and CodeMirror.listMIMEs functions.

OnBlur

Represents property OnBlur.

OnChange

When given, this function will be called every time the content of the editor is changed. It will be given the editor instance as first argument, and an {from, to, text, next} object containing information about the changes that occurred as second argument. from and to are the positions (in the pre-change coordinate system) where the change started and ended (for example, it might be {ch:0, line:18} if the position is at the beginning of line #19). text is an array of strings representing the text that replaced the changed range (split by line). If multiple changes happened during a single operation, the object will have a next property pointing to another change object (which may point to another, etc).

OnCursorActivity

Will be called when the cursor or selection moves, or any change is made to the editor content.

OnFocus

The given functions will be called whenever the editor is focused or unfocused.

OnGutterClick

When given, will be called whenever the editor gutter (the line-number area) is clicked. Will be given the editor instance as first argument, the (zero-based) number of the line that was clicked as second argument, and the raw mousedown event object as third argument.

OnHighlightComplete

Whenever the editor's content has been fully highlighted, this function (if given) will be called. It'll be given a single argument, the editor instance.

OnKeyEvent

This provides a rather low-level hook into CodeMirror's key handling. If provided, this function will be called on every keydown, keyup, and keypress event that CodeMirror captures. It will be passed two arguments, the editor instance and the key event. This key event is pretty much the raw key event, except that a stop() method is always added to it. You could feed it to, for example, jQuery.Event to further normalize it. This function can inspect the key event, and handle it if it wants to. It may return true to tell CodeMirror to ignore the event. Be wary that, on some browsers, stopping a keydown does not stop the keypress from firing, whereas on others it does. If you respond to an event, you should probably inspect its type property and only do something when it is keydown (or keypress for actions that need character data).

OnScroll

When given, will be called whenever the editor is scrolled.

OnUpdate

Will be called whenever CodeMirror updates its DOM display.

Owner

Represents property Owner. (Inherited from TIWCGJSon.)

PollInterval

Indicates how quickly CodeMirror should poll its input textarea for changes. Most input is captured by events, but some things, like IME input on some browsers, doesn't generate events that allow CodeMirror to properly detect it. Thus, it polls. Default is 100 milliseconds.

PropCount

Represents property PropCount. (Inherited from TIWCGJSon.)

PropIndexByName[string]

Represents property PropIndexByName[string]. (Inherited from TIWCGJSon.)

PropList

Represents property PropList. (Inherited from TIWCGJSon.)

PropName

Represents property PropName. (Inherited from TIWCGJSon.)

PropNameByIndex[Integer]

Represents property PropNameByIndex[Integer]. (Inherited from TIWCGJSon.)

ReadOnly

This disables editing of the editor content by the user. If the special value "nocursor" is given (instead of simply true), focusing of the editor is also disallowed.

SmartIndent

Whether to use the context-sensitive indentation that the mode provides (or just indent the same as the line before). Defaults to true.

SObj

Represents property SObj. (Inherited from TIWCGJSon.)

TabIndex

The tab index to assign to the editor. If not given, no tab index will be assigned.

TabSize

The width of a tab character. Defaults to 4.

Theme

The theme to style the editor with. You must make sure the CSS file defining the corresponding .cm-s-[name] styles is loaded (see the theme directory in the distribution). The default is "default", for which colors are included in codemirror.css. It is possible to use multiple theming classes at once—for example "foo bar" will assign both the cm-s-foo and the cm-s-bar classes to the editor.

UndoDepth

The maximum number of undo levels that the editor stores. Defaults to 40.

Value

The starting value of the editor.

WorkDelay

Represents property WorkDelay.

WorkTime

Highlighting is done by a pseudo background-thread that will work for workTime milliseconds, and then use timeout to sleep for workDelay milliseconds. The defaults are 200 and 300, you can change these options to make the highlighting more or less aggressive.

Top
Show:
 NameDescription
AddBooleanMember(string,Boolean,Boolean,Boolean)

Represents method AddBooleanMember(string,Boolean,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddColorMember(string,TIWCGColor,Boolean,Boolean)

Represents method AddColorMember(string,TIWCGColor,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddCurrencyMember(string,Currency,Boolean,Boolean)

Represents method AddCurrencyMember(string,Currency,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddDoubleMember(string,Double,Boolean,Boolean)

Represents method AddDoubleMember(string,Double,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddDynObjListMember(string,Boolean,Boolean)

Represents method AddDynObjListMember(string,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddEnumMember(string,string[],Byte,Boolean,Boolean)

Represents method AddEnumMember(string,string[],Byte,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddEnumSetMember(string,string[],Void,Word,Boolean,Boolean)

Represents method AddEnumSetMember(string,string[],Void,Word,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddFuncMember(string,string,string,Boolean,TIWCGJSonFuncClass,Boolean,Boolean)

Represents method AddFuncMember(string,string,string,Boolean,TIWCGJSonFuncClass,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddHTML5(TIWHTMLTag)

Represents method AddHTML5(TIWHTMLTag). (Inherited from TIWCGJSon.)

AddIntegerMember(string,Integer,Boolean,Boolean)

Represents method AddIntegerMember(string,Integer,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddJSonMember(string,TCGJSon,Boolean,Boolean)

Represents method AddJSonMember(string,TCGJSon,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddMembers

The procedure add jquery properties.

Notes to Inheritors

Override this procedure to add jquery plugin options.

 (Overrides TIWCGJSon.AddMembers.)
AddObjListMember(string,TIWCGJSonListClass,Boolean,Boolean,Boolean)

Represents method AddObjListMember(string,TIWCGJSonListClass,Boolean,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddObjMember(string,TIWCGJSonClass,Boolean,Boolean,Boolean)

Represents method AddObjMember(string,TIWCGJSonClass,Boolean,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddSimpleArrayMember(string,Boolean,Boolean,Boolean)

Represents method AddSimpleArrayMember(string,Boolean,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddStringMember(string,string,Boolean,Boolean)

Represents method AddStringMember(string,string,Boolean,Boolean). (Inherited from TIWCGJSon.)

AddVariantMember(string,Variant,Boolean,Boolean)

Represents method AddVariantMember(string,Variant,Boolean,Boolean). (Inherited from TIWCGJSon.)

AfterConstruction

Represents method AfterConstruction. (Inherited from TIWCGJSon.)

Assign(TPersistent)

Represents method Assign(TPersistent). (Inherited from TIWCGJSon.)

CheckJSonMember(Integer)

Represents method CheckJSonMember(Integer). (Inherited from TIWCGJSon.)

ConvertEnumToString(string)

Represents method ConvertEnumToString(string). (Inherited from TIWCGJSon.)

ConvertSetToString(string,TCGStringArray)

Represents method ConvertSetToString(string,TCGStringArray). (Inherited from TIWCGJSon.)

FreeJSonObj(Integer)

Overloaded. Represents method FreeJSonObj(Integer). (Inherited from TIWCGJSon.)

FreeJSonObj(string)

Overloaded. Represents method FreeJSonObj(string). (Inherited from TIWCGJSon.)

GetBooleanValue(Integer)

Represents method GetBooleanValue(Integer). (Inherited from TIWCGJSon.)

GetCGJSContainer

Represents method GetCGJSContainer. (Inherited from TIWCGJSon.)

GetColorValue(Integer)

Represents method GetColorValue(Integer). (Inherited from TIWCGJSon.)

GetCurrencyValue(Integer)

Represents method GetCurrencyValue(Integer). (Inherited from TIWCGJSon.)

GetCustomJq(string,ISuperObject)

Represents method GetCustomJq(string,ISuperObject). (Overrides TIWCGJSon.GetCustomJq(string,ISuperObject).)

GetDoubleValue(Integer)

Represents method GetDoubleValue(Integer). (Inherited from TIWCGJSon.)

GetDynObjListValue(Integer)

Represents method GetDynObjListValue(Integer). (Inherited from TIWCGJSon.)

GetEnumAsString(Integer)

Represents method GetEnumAsString(Integer). (Inherited from TIWCGJSon.)

GetEnumerValue(Integer)

Represents method GetEnumerValue(Integer). (Inherited from TIWCGJSon.)

GetEnumSetValue(Integer,Pointer)

Represents method GetEnumSetValue(Integer,Pointer). (Inherited from TIWCGJSon.)

GetFixedScript(TIWCGJSonFunc,Boolean)

Represents method GetFixedScript(TIWCGJSonFunc,Boolean). (Inherited from TIWCGJSon.)

GetFuncValue(Integer)

Represents method GetFuncValue(Integer). (Inherited from TIWCGJSon.)

GetHTMLName

Represents method GetHTMLName. (Inherited from TIWCGJSon.)

GetImplComponent

Represents method GetImplComponent. (Inherited from TIWCGJSon.)

GetIntegerValue(Integer)

Represents method GetIntegerValue(Integer). (Inherited from TIWCGJSon.)

GetIsStored

Represents method GetIsStored. (Inherited from TIWCGJSon.)

GetItemIndex

Represents method GetItemIndex. (Inherited from TIWCGJSon.)

GetIWCLName

Represents method GetIWCLName. (Inherited from TIWCGJSon.)

GetJSon

Represents method GetJSon. (Inherited from TIWCGJSon.)

GetJSonByType(Boolean,Boolean)

Represents method GetJSonByType(Boolean,Boolean). (Inherited from TIWCGJSon.)

GetJSonEx(Boolean,Boolean,TIWCGResponseMemberList,Boolean)

Represents method GetJSonEx(Boolean,Boolean,TIWCGResponseMemberList,Boolean). (Inherited from TIWCGJSon.)

GetJSonValue(Integer)

Represents method GetJSonValue(Integer). (Inherited from TIWCGJSon.)

GetJSonValueObj(Integer)

Represents method GetJSonValueObj(Integer). (Inherited from TIWCGJSon.)

GetMemberJSon(TCGJSonMember,ISuperObject,Boolean,Boolean,string)

Represents method GetMemberJSon(TCGJSonMember,ISuperObject,Boolean,Boolean,string). (Inherited from TIWCGJSon.)

GetMemberSetterHandler(TObject,TCGJSonMember)

Represents method GetMemberSetterHandler(TObject,TCGJSonMember). (Inherited from TIWCGJSon.)

GetMemberSetterScriptParts(TIWCGResponseMemberList,TIWCGJScript)

Represents method GetMemberSetterScriptParts(TIWCGResponseMemberList,TIWCGJScript). (Overrides TIWCGJSon.GetMemberSetterScriptParts(TIWCGResponseMemberList,TIWCGJScript).)

GetMembersJSon(TIWCGResponseMemberList,Boolean,Boolean)

Represents method GetMembersJSon(TIWCGResponseMemberList,Boolean,Boolean). (Inherited from TIWCGJSon.)

GetObjListValue(Integer)

Represents method GetObjListValue(Integer). (Inherited from TIWCGJSon.)

GetObjValue(Integer)

Represents method GetObjValue(Integer). (Inherited from TIWCGJSon.)

GetOwner

Represents method GetOwner. (Inherited from TIWCGJSon.)

GetPropName

Represents method GetPropName. (Inherited from TIWCGJSon.)

GetSimpleArrayValue(Integer)

Represents method GetSimpleArrayValue(Integer). (Inherited from TIWCGJSon.)

GetStringValue(Integer)

Represents method GetStringValue(Integer). (Inherited from TIWCGJSon.)

GetVariantValue(Integer)

Represents method GetVariantValue(Integer). (Inherited from TIWCGJSon.)

InternalGetJSon(TEachPropJSonProc,Boolean,Boolean,Void,Boolean,Boolean,TIWCGResponseMemberList,Boolean)

Represents method InternalGetJSon(TEachPropJSonProc,Boolean,Boolean,Void,Boolean,Boolean,TIWCGResponseMemberList,Boolean). (Inherited from TIWCGJSon.)

IsArray

Represents method IsArray. (Inherited from TIWCGJSon.)

IsBooleanStored(Integer)

Represents method IsBooleanStored(Integer). (Inherited from TIWCGJSon.)

IsColorStored(Integer)

Represents method IsColorStored(Integer). (Inherited from TIWCGJSon.)

IsCurrencyStored(Integer)

Represents method IsCurrencyStored(Integer). (Inherited from TIWCGJSon.)

IsDoubleStored(Integer)

Represents method IsDoubleStored(Integer). (Inherited from TIWCGJSon.)

IsEnumerStored(Integer)

Represents method IsEnumerStored(Integer). (Inherited from TIWCGJSon.)

IsEnumSetStored(Integer)

Represents method IsEnumSetStored(Integer). (Inherited from TIWCGJSon.)

IsFuncStored(Integer)

Represents method IsFuncStored(Integer). (Inherited from TIWCGJSon.)

IsIntegerStored(Integer)

Represents method IsIntegerStored(Integer). (Inherited from TIWCGJSon.)

IsJSonObjStored(string)

Represents method IsJSonObjStored(string). (Inherited from TIWCGJSon.)

IsJSonStored(Integer)

Represents method IsJSonStored(Integer). (Inherited from TIWCGJSon.)

IsObjStored(Integer)

Represents method IsObjStored(Integer). (Inherited from TIWCGJSon.)

IsStringStored(Integer)

Represents method IsStringStored(Integer). (Inherited from TIWCGJSon.)

IsVariantStored(Integer)

Represents method IsVariantStored(Integer). (Inherited from TIWCGJSon.)

JSonEscape

Represents method JSonEscape. (Inherited from TIWCGJSon.)

JSonIdent

Represents method JSonIdent. (Inherited from TIWCGJSon.)

JSonNameQuote

Represents method JSonNameQuote. (Inherited from TIWCGJSon.)

ResetProps

Represents method ResetProps. (Inherited from TIWCGJSon.)

SetBooleanValue(Integer,Boolean)

Represents method SetBooleanValue(Integer,Boolean). (Inherited from TIWCGJSon.)

SetColorValue(Integer,TIWCGColor)

Represents method SetColorValue(Integer,TIWCGColor). (Inherited from TIWCGJSon.)

SetCurrencyValue(Integer,Currency)

Represents method SetCurrencyValue(Integer,Currency). (Inherited from TIWCGJSon.)

SetDoubleValue(Integer,Double)

Represents method SetDoubleValue(Integer,Double). (Inherited from TIWCGJSon.)

SetDynObjListValue(Integer,TIWCGJSonDynObjList)

Represents method SetDynObjListValue(Integer,TIWCGJSonDynObjList). (Inherited from TIWCGJSon.)

SetEnumerValue(Integer,Byte)

Represents method SetEnumerValue(Integer,Byte). (Inherited from TIWCGJSon.)

SetEnumSetValue(Integer,Pointer)

Represents method SetEnumSetValue(Integer,Pointer). (Inherited from TIWCGJSon.)

SetFuncValue(Integer,TIWCGJSonFunc)

Represents method SetFuncValue(Integer,TIWCGJSonFunc). (Inherited from TIWCGJSon.)

SetIntegerValue(Integer,Integer)

Represents method SetIntegerValue(Integer,Integer). (Inherited from TIWCGJSon.)

SetJSonValue(Integer,TCGJSon)

Represents method SetJSonValue(Integer,TCGJSon). (Inherited from TIWCGJSon.)

SetObjListValue(Integer,TIWCGJSonList)

Represents method SetObjListValue(Integer,TIWCGJSonList). (Inherited from TIWCGJSon.)

SetObjValue(Integer,TIWCGJSon)

Represents method SetObjValue(Integer,TIWCGJSon). (Inherited from TIWCGJSon.)

SetSimpleArrayValue(Integer,TIWCGJSonSimpleArray)

Represents method SetSimpleArrayValue(Integer,TIWCGJSonSimpleArray). (Inherited from TIWCGJSon.)

SetStringValue(Integer,string)

Represents method SetStringValue(Integer,string). (Inherited from TIWCGJSon.)

SetVariantValue(Integer,Variant)

Represents method SetVariantValue(Integer,Variant). (Inherited from TIWCGJSon.)

StoreProperty(PPropInfo,TObject)

Represents method StoreProperty(PPropInfo,TObject). (Inherited from TIWCGJSon.)

SupportsSetter(TObject,TCGJSonMember)

Represents method SupportsSetter(TObject,TCGJSonMember). (Overrides TIWCGJSon.SupportsSetter(TObject,TCGJSonMember).)

Top
Show:
 NameDescription
_Events_

Represents property _Events_. (Inherited from TIWCGJSon.)

Top