TIWCGJSCodeMirrorConfig Class
CodeMiror Options class
The TIWCGJSCodeMirrorConfig type exposes the following members.
Name | Description | |
---|---|---|
![]() | 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 |
![]() | ClassData | Represents property |
![]() | CodeMirror | Represents property |
![]() | 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 |
![]() | IsStored | Represents property |
![]() | JSon | Return the Interface of SuperObject (ISuperObject) (Inherited from TIWCGJSon.) |
![]() | JSonEvents[string] | Represents property |
![]() | 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 |
![]() | MatchBrackets | Determines whether brackets are matched whenever the cursor is moved next to a bracket. |
![]() | MemberList | Represents property |
![]() | 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 |
![]() | 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 |
![]() | 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 |
![]() | PropIndexByName[string] | Represents property |
![]() | PropList | Represents property |
![]() | PropName | Represents property |
![]() | PropNameByIndex[Integer] | Represents property |
![]() | 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 |
![]() | 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 |
![]() | 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. |
Name | Description | |||
---|---|---|---|---|
![]() | AddBooleanMember(string,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddColorMember(string,TIWCGColor,Boolean,Boolean) | Represents method | ||
![]() | AddCurrencyMember(string,Currency,Boolean,Boolean) | Represents method | ||
![]() | AddDoubleMember(string,Double,Boolean,Boolean) | Represents method | ||
![]() | AddDynObjListMember(string,Boolean,Boolean) | Represents method | ||
![]() | AddEnumMember(string,string[],Byte,Boolean,Boolean) | Represents method | ||
![]() | AddEnumSetMember(string,string[],Void,Word,Boolean,Boolean) | Represents method | ||
![]() | AddFuncMember(string,string,string,Boolean,TIWCGJSonFuncClass,Boolean,Boolean) | Represents method | ||
![]() | AddHTML5(TIWHTMLTag) | Represents method | ||
![]() | AddIntegerMember(string,Integer,Boolean,Boolean) | Represents method | ||
![]() | AddJSonMember(string,TCGJSon,Boolean,Boolean) | Represents method | ||
![]() | AddMembers | The procedure add jquery properties.
| ||
![]() | AddObjListMember(string,TIWCGJSonListClass,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddObjMember(string,TIWCGJSonClass,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddSimpleArrayMember(string,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddStringMember(string,string,Boolean,Boolean) | Represents method | ||
![]() | AddVariantMember(string,Variant,Boolean,Boolean) | Represents method | ||
![]() | AfterConstruction | Represents method | ||
![]() | Assign(TPersistent) | Represents method | ||
![]() | CheckJSonMember(Integer) | Represents method | ||
![]() | ConvertEnumToString(string) | Represents method | ||
![]() | ConvertSetToString(string,TCGStringArray) | Represents method | ||
![]() | FreeJSonObj(Integer) | Overloaded. Represents method | ||
![]() | FreeJSonObj(string) | Overloaded. Represents method | ||
![]() | GetBooleanValue(Integer) | Represents method | ||
![]() | GetCGJSContainer | Represents method | ||
![]() | GetColorValue(Integer) | Represents method | ||
![]() | GetCurrencyValue(Integer) | Represents method | ||
![]() | GetCustomJq(string,ISuperObject) | Represents method | ||
![]() | GetDoubleValue(Integer) | Represents method | ||
![]() | GetDynObjListValue(Integer) | Represents method | ||
![]() | GetEnumAsString(Integer) | Represents method | ||
![]() | GetEnumerValue(Integer) | Represents method | ||
![]() | GetEnumSetValue(Integer,Pointer) | Represents method | ||
![]() | GetFixedScript(TIWCGJSonFunc,Boolean) | Represents method | ||
![]() | GetFuncValue(Integer) | Represents method | ||
![]() | GetHTMLName | Represents method | ||
![]() | GetImplComponent | Represents method | ||
![]() | GetIntegerValue(Integer) | Represents method | ||
![]() | GetIsStored | Represents method | ||
![]() | GetItemIndex | Represents method | ||
![]() | GetIWCLName | Represents method | ||
![]() | GetJSon | Represents method | ||
![]() | GetJSonByType(Boolean,Boolean) | Represents method | ||
![]() | GetJSonEx(Boolean,Boolean,TIWCGResponseMemberList,Boolean) | Represents method | ||
![]() | GetJSonValue(Integer) | Represents method | ||
![]() | GetJSonValueObj(Integer) | Represents method | ||
![]() | GetMemberJSon(TCGJSonMember,ISuperObject,Boolean,Boolean,string) | Represents method | ||
![]() | GetMemberSetterHandler(TObject,TCGJSonMember) | Represents method | ||
![]() | GetMemberSetterScriptParts(TIWCGResponseMemberList,TIWCGJScript) | Represents method | ||
![]() | GetMembersJSon(TIWCGResponseMemberList,Boolean,Boolean) | Represents method | ||
![]() | GetObjListValue(Integer) | Represents method | ||
![]() | GetObjValue(Integer) | Represents method | ||
![]() | GetOwner | Represents method | ||
![]() | GetPropName | Represents method | ||
![]() | GetSimpleArrayValue(Integer) | Represents method | ||
![]() | GetStringValue(Integer) | Represents method | ||
![]() | GetVariantValue(Integer) | Represents method | ||
![]() | InternalGetJSon(TEachPropJSonProc,Boolean,Boolean,Void,Boolean,Boolean,TIWCGResponseMemberList,Boolean) | Represents method | ||
![]() ![]() | IsArray | Represents method | ||
![]() | IsBooleanStored(Integer) | Represents method | ||
![]() | IsColorStored(Integer) | Represents method | ||
![]() | IsCurrencyStored(Integer) | Represents method | ||
![]() | IsDoubleStored(Integer) | Represents method | ||
![]() | IsEnumerStored(Integer) | Represents method | ||
![]() | IsEnumSetStored(Integer) | Represents method | ||
![]() | IsFuncStored(Integer) | Represents method | ||
![]() | IsIntegerStored(Integer) | Represents method | ||
![]() | IsJSonObjStored(string) | Represents method | ||
![]() | IsJSonStored(Integer) | Represents method | ||
![]() | IsObjStored(Integer) | Represents method | ||
![]() | IsStringStored(Integer) | Represents method | ||
![]() | IsVariantStored(Integer) | Represents method | ||
![]() ![]() | JSonEscape | Represents method | ||
![]() ![]() | JSonIdent | Represents method | ||
![]() ![]() | JSonNameQuote | Represents method | ||
![]() | ResetProps | Represents method | ||
![]() | SetBooleanValue(Integer,Boolean) | Represents method | ||
![]() | SetColorValue(Integer,TIWCGColor) | Represents method | ||
![]() | SetCurrencyValue(Integer,Currency) | Represents method | ||
![]() | SetDoubleValue(Integer,Double) | Represents method | ||
![]() | SetDynObjListValue(Integer,TIWCGJSonDynObjList) | Represents method | ||
![]() | SetEnumerValue(Integer,Byte) | Represents method | ||
![]() | SetEnumSetValue(Integer,Pointer) | Represents method | ||
![]() | SetFuncValue(Integer,TIWCGJSonFunc) | Represents method | ||
![]() | SetIntegerValue(Integer,Integer) | Represents method | ||
![]() | SetJSonValue(Integer,TCGJSon) | Represents method | ||
![]() | SetObjListValue(Integer,TIWCGJSonList) | Represents method | ||
![]() | SetObjValue(Integer,TIWCGJSon) | Represents method | ||
![]() | SetSimpleArrayValue(Integer,TIWCGJSonSimpleArray) | Represents method | ||
![]() | SetStringValue(Integer,string) | Represents method | ||
![]() | SetVariantValue(Integer,Variant) | Represents method | ||
![]() | StoreProperty(PPropInfo,TObject) | Represents method | ||
![]() | SupportsSetter(TObject,TCGJSonMember) | Represents method |