2022 April Release

Control FSCCODEEDITOR@1.1001:ControlStdCodeEditor Permanent link for this heading

Standard source code editor based on Code Mirror (see http://codemirror.net)
This control is used to display and edit source code, like Fabasoft app.ducx Expressions, Fabasoft app.ducx Queries, JavaScript, HTML or XML. See http://codemirror.net/doc/manual.html for more details on parameters and keyboard assignments.

Example:
layout {
  row {
    ControlStdCodeEditor(
      "mode: 'text/html', lineNumbers: false") myeditor {
      ...
    }
  }
}
The following arguments are supported:
  • mode (string): Defines the mode, i.e. the language support, for the editor. The following modes are supported:
    • "application/x-ducxexpression"
    • "application/x-fscexpression"
    • "application/x-fscquery"
    • "text/xml"
    • "application/xml"
    • "text/html"
    • "text/css"
    • "text/javascript"
    • "text/ecmascript"
    • "application/javascript"
    • "application/ecmascript"
    • "application/json"
    • "text/typescript"
    • "application/typescript"
    The default mode is "application/x-ducxexpression" if a language service is available, otherwise "application/x-fscexpression".
  • indentUnit (integer): Defines the indentation unit for the editor. The default value is 2.
  • smartIndent (boolean): Defines whether the editor uses smart indentation i.e. on pressing the <Enter> key. The default value is true.
  • tabSize (integer): Defines the tab size i.e. the number of characters when pressing the <Tab> key. The default value is 2.
  • indentWithTabs (boolean): Defines whether the editor uses tabs for indentation. The default value is false.
  • lineWrapping (boolean): Defines whether the editor should wrap lines. The default value is false.
  • lineNumbers (boolean): Defines whether the editor should show line numbers. The default value is true.
  • firstLineNumber (integer): If specified (and together with lineNumbers) this setting defines the number of the first line in the editor. If a Fabasoft app.ducx Expression is used with the editor and the code contains a %%LINE directive, this number is used to determine the number of the first line automatically. To leverage this automatic determination, the argument firstLineNumber must not be used.
  • showCursorWhenSelecting (boolean): Defines whether the editor shows a cursor when selecting text. The default value is false.
  • matchTags (boolean): Defines whether the editor highlights matching tags during editing. The default value is true with HTML or XML files.
  • matchBrackets (boolean): Defines whether the editor highlights matching brackets during editing. The default value is true.
  • autoCloseTags (boolean): Defines whether the editor automatically closes HTML or XML tags during editing. The default value is true with HTML or XML files.
  • autoCloseBrackets (boolean): Defines whether the editor automatically inserts closing brackets during editing. The default value is true.
  • scrollbarStyle (string): Defines the style for the scroll bars of the editor. The default value is "simple".
  • extraKeys (JSON object): Defines the keyboard shortcuts of the editor. The following default assignments are used:
    • <Strg>+F: Search (Regular Expressions)
    • <Shift><Strg>+F: Search and replace (Regular Expressions)
    • <Shift><Strg>+R: Search and replace all occurrences (Regular Expressions)
    • <Strg>+G: Find next
    • <Shift><Strg>+G: Find previous
    • <Strg>+T: Transpose characters
    • <Strg>+<Space>: Auto Completion
    • <Strg>+Q: Fold or unfold code
    • <Strg>+L: Add comment to selection
    • <Shift>+<Strg>+L: Remove commenting of selection
    • <Strg>+I: Increase indent of selection
    • <Shift>+<Strg>+I: Decrease intent of selection
    • <F11>: Toggle full screen mode

FSCCODEEDITOR@1.1001:ControlStdCodeEditor()

Additional Information