# GraffitiSyntaxEditor
Class Inherits GraffitiWebUIControl
## About
GraffitiSyntaxEditor is a full featured code and text editor component with support for 34 themes, 142 languages (modes), and the following features:
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| AnnotationTypes | Info <br > Warning <br > Error | (None) |
| Modes | ABAP <br > ABC <br > ActionScript <br > ADA <br > ApacheConf <br > AppleScript <br > ASCIIDoc <br > AssemblyX86 <br > AutoHotKey <br > BatchFile <br > Bro <br > C_CPP <br > C9Search <br > Cirru <br > Clojure <br > Cobol <br > CoffeeScript <br > ColdFusion <br > CSharp <br > CSS <br > Curly <br > D <br > Dart <br > Diff <br > Django <br > DockerFile <br > Dot <br > Drools <br > Eiffel <br > EJS <br > Elixir <br > Elm <br > ERLang <br > Forth <br > Fortran <br > FTL <br > GCode <br > Gherkin <br > GitIgnore <br > GLSL <br > Gobstones <br > GOLang <br > Groovy <br > HAML <br > Handlebars <br > Haskell <br > HaskellCabal <br > Haxe <br > HJSON <br > HTML <br > HTMLElixir <br > HTMLRuby <br > INI <br > IO <br > Jack <br > Jade <br > Java <br > JavaScript <br > JSON <br > JSONIQ <br > JSP <br > JSX <br > Julia <br > Kotlin <br > LaTeX <br > Lean <br > LESS <br > Liquid <br > LISP <br > Live_Script <br > LiveScript <br > LogIQL <br > LSL <br > LUA <br > LUAPage <br > Lucene <br > MakeFile <br > Markdown <br > Mask <br > MatLab <br > Maze <br > Mel <br > MIPS_Assembler <br > MIPSAssembler <br > MushCode <br > MySQL <br > Nix <br > NSIS <br > ObjectiveC <br > OCAML <br > Pascal <br > Perl <br > PGSQL <br > PHP <br > PlainText <br > PowerShell <br > Praat <br > Prolog <br > Properties <br > Protobuf <br > Python <br > R <br > Razor <br > RDoc <br > RHTML <br > RST <br > Ruby <br > Rust <br > SASS <br > SCAD <br > Scala <br > Scheme <br > SCSS <br > SH <br > SJS <br > Smarty <br > Snippets <br > SoyTemplate <br > Space <br > SQL <br > SQLServer <br > Stylus <br > SVG <br > Swift <br > Swig <br > TCL <br > Tex <br > Text <br > Textile <br > TOML <br > TSX <br > Twig <br > TypeScript <br > Vala <br > VBScript <br > Velocity <br > Verilog <br > VHDL <br > Wollok <br > XML <br > Xojo <br > XQuery <br > YAML | (None) |
| Themes | Ambiance <br > Chaos <br > Chrome <br > Clouds <br > CloudsMidnight <br > Cobalt <br > CrimsonEditor <br > Dawn <br > Dreamweaver <br > Eclipse <br > GitHub <br > IdleFingers <br > iPlastic <br > Katzenmilch <br > KRTheme <br > Kuroir <br > Merbivore <br > MerbivoreSoft <br > MonoIndustrial <br > Monokai <br > PastelOnDark <br > SolarizedDark <br > SolarizedLight <br > SQLServer <br > Terminal <br > TextMate <br > Tomorrow <br > TomorrowNight <br > TomorrowNightBlue <br > TomorrowNightBright <br > TomorrowNightEighties <br > Twilight <br > VibrantInk <br > XCode | (None) |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| BreakpointCleared | Row as Integer | (None) | Raised when the user clears a breakpoint by clicking on the line number gutter. |
| BreakpointSet | Row as Integer | (None) | Raised when the user sets a breakpoint by clicking on the line number gutter. |
| ContextClick | X as Integer <br> Y as Integer <br> CtrlKey as Boolean <br> ShiftKey as Boolean | (None) | Raised when the user right-clicks or long-presses the editor. |
| HTMLRendered | content as String | (None) | Raised when the content is returned after calling the ToHTML method. |
| Open | (None) | (None) | (None) |
| Ready | (None) | (None) | Raised when the control is ready for interaction. |
| SelChange | (None) | (None) | Fires when the user changes their selection, either by using the mouse or the keyboard. |
| Shown | (None) | (None) | (None) |
| TextChange | (None) | (None) | Fires when the user changes the text within the syntax editor. |
| UndoManager | (None) | (None) | This event signals a change in the CanUndo and CanRedo properties, allowing for dynamic menu enabling/disabling based on state. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| AnnotationAdd | Row as Integer <br> theText as String <br> theType as AnnotationTypes | (None) | This method will add an annotation icon with informational tooltip to the left of the line numbers in the gutter of the Row specified. |
| AnnotationRemove | Row as Integer | (None) | Remove any annotation on Row. |
| AnnotationRemoveAll | (None) | (None) | Remove all annotations. |
| BreakpointAdd | Row as Integer | (None) | Add a breakpoint to Row. |
| BreakpointRemove | Row as Integer | (None) | Remove breakpoint from Row. |
| BreakpointRemoveAll | (None) | (None) | Remove all breakpoints from the current document. |
| DeselectAll | (None) | (None) | Deselect all text in the current document. |
| Find | theText as String <br> intStartPosition as Integer = 0 <br> blnBackward as Boolean = false <br> blnWrap as Boolean = False <br> blnCaseSensitive as Boolean = False <br> blnWholeWord as Boolean = False <br> blnRegEx as Boolean = False <br> blnSkipCurrentLine as Boolean = False | (None) | This starts the Find system. |
| FindNext | (None) | (None) | Finds the next searched for match in the document. Must follow a call to Find() |
| FindPrevious | (None) | (None) | Finds the searched for match in the document by moving backward from the current position. Must follow a call to Find() |
| GotoLine | theLine as Integer | (None) | Automatically sets the cursor to the start of the line signified by Row. |
| Insert | theText as String | (None) | Inserts theText in to the Syntax Editor at the cursor's current position. |
| Redo | (None) | (None) | Redo an undone change to the text. |
| Replace | replaceWith as String | (None) | Replace a searched for match. Must follow a call to Find() |
| ReplaceAll | strReplace as String | (None) | Replace all matches for the previous search. Must follow a call to Find() |
| ReplaceAll | strFind as String <br> strReplace as String | (None) | Replace all matches for the previous search. Must follow a call to Find() |
| ResetUndoStack | (None) | (None) | Clears the Undo/Redo stack. Useful if you are saving the document and don't want to allow reversing changes back beyond that point. |
| Resize | (None) | (None) | (None) |
| ScrollToLine | Row as Integer | (None) | Scrolls Row in to the syntax editor view. |
| SelectAll | (None) | (None) | Selects all text within the editor. |
| SelectionIndent | (None) | (None) | Indents the current line. |
| SelectionOutdent | (None) | (None) | Outdents the current line. |
| SelectionToggleComment | (None) | (None) | Toggles comment on the current line. |
| SelectionToLowercase | (None) | (None) | Convert all text in the current selection to lowercase. |
| SelectionToUppercase | (None) | (None) | Convert all text in the current selection to uppercase. |
| SelectLine | Row as Integer | (None) | Select the line signified by Row. |
| SetFocus | (None) | (None) | (None) |
| ToHTML | includeCSS as Boolean = True | (None) | Signals the client to convert the content to styled HTML and send it back to the server. HTMLRendered event will be raised upon receipt. |
| Undo | (None) | (None) | Undo a user's change to the text. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Annotations() | Dictionary | (None) | The currently applied row annotations. Should not be modified directly. |
| AvailableModes() | String | (None) | The currently available syntax highlighting modes. |
| AvailableThemes() | String | (None) | The currently available display themes. |
| CanRedo | Boolean | (None) | If the editor can Redo a recently undone change. |
| CanUndo | Boolean | (None) | If the editor can undo a recent change. |
| CodeFolding | Boolean | (None) | If True and supported by the selected Mode, code blocks will be allowed to fold by clicking an arrow on the gutter. |
| CursorColumn | Integer | (None) | The column of the document where the cursor currently resides. |
| CursorRow | Integer | (None) | The row of the document where the cursor currently resides. |
| FirstVisibleRow | Integer | (None) | The first line that is visible in the editor's display. |
| FontFamily | String | (None) | Font family used for code within the editor. |
| FontSize | Integer | (None) | The size of font to use for the code in the editor. |
| HighlightActiveLine | Boolean | (None) | Places a colored highlight over the line where the cursor resides. This makes it easier for users to quickly find where they left off. |
| LastVisibleRow | Integer | (None) | The last line that is visible in the editor's display. |
| LineCount | Integer | (None) | The number of lines in the current document. |
| Mode | String | (None) | The syntax highlight mode to use. |
| ReadOnly | Boolean | (None) | If True, users will not be able to edit the contents of the field. |
| SelEnd | Integer | (None) | The end position of the current selection range. |
| SelStart | Integer | (None) | The start position of the current selection range. |
| SelText | String | (None) | The currently selected text in the editor. |
| ShowGutter | Boolean | (None) | Controls visibility of the left-hand editor gutter containing line numbers and collapsible section controllers. |
| ShowIndentGuides | Boolean | (None) | Controls the display of indentation guides. |
| ShowInvisibles | Boolean | (None) | Controls the display of invisible characters. |
| ShowPrintMargin | Boolean | (None) | If True, a print margin line and color differentiation will be display along the left-side corresponding to the width of a 8.5×11 sheet. |
| SoftTabs | Boolean | (None) | Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character. |
| SyntaxChecking | Boolean | (None) | Controls whether the component will check syntax for errors. |
| Text | String | (None) | Get/Set the current text of the document, as a whole. |
| Theme | String | (None) | The theme used to display the syntax editor. |
| WordWrap | Boolean | (None) | Sets whether or not line wrapping is enabled. |