Code Editor is a gh-element that allows to enter, save, and edit code. It is a useful tool for work with code in your application.
The entered code will be highlighted depending on its syntax. This will help you work with the code.
Please note that this element only supports HTML and JS syntax. And for each of them, you need to use a different mode.
By default, the text editor has 17 lines. But if the code is longer, additional lines will be added.
The main ways to use this element are quite obvious. The Code Editor is used to save and edit code. The saved code can be extracted and used in other automation elements or processes. In fact, it copies the classic code editor. So if you know how it works, you won't have any problems using it.
The code editor element has not a big number of settings that can configure it and all of them are contained in one group.
The only configuration settings of the code editor consist two standard and one additional options.
|allows to select the operating mode of the element
The Code Editor can work with two types of code. This element has different work modes for both of those types:
After selecting one of the modes, the entered code will be highlighted according to the code syntax.
This allows you to work comfortably with the code.
This element cannot be filtered out.
The only interpretation type allows the element to be displayed the space where the code is entered and where it could be updated.
When the user enters the code, GudHub creates a new file where this code is saved. And exactly the ID of that file is a field value of the code editor element.
All such files are contained in the file list of the application where the element is located.
The half of properties in the data model cannot be configured. They have a constant default value.
|contains selected code mode
|contains all element interpretation types
|shows whether the file will be saved or not
|contains the element theme