Attention: Here be dragons (unstable version)
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Redot.
Checking the stable version of the documentation...
GDScriptSyntaxHighlighter
Inherits: EditorSyntaxHighlighter < SyntaxHighlighter < Resource < RefCounted < Object
A GDScript syntax highlighter that can be used with TextEdit and CodeEdit nodes.
Description
Note: This class can only be used for editor plugins because it relies on editor settings.
var code_preview = TextEdit.new()
var highlighter = GDScriptSyntaxHighlighter.new()
code_preview.syntax_highlighter = highlighter
var codePreview = new TextEdit();
var highlighter = new GDScriptSyntaxHighlighter();
codePreview.SyntaxHighlighter = highlighter;