ToolJet/docs/versioned_docs/version-2.68.0/widgets/code-editor.md
Aman Regu bdfe3270e2
[docs]: v2.68.0-Beta (#10755)
* docs: jira

* docs: formatting + Client Credentials grant type

* docs: connection string pgsql

* docs: parameterized queries mysql

* docs: parameterized queries in PostgreSQL

* docs: update mysql example

* docs: TJDB sql editor

* docs: add metadata to REST API

* docs: add, update  postgresql media

* docs: add metadata to graphql

* docs: update parameterized queries

* docs: add parameterized queries for mssql

* docs: add SSL Cert to mysql

* docs: TJDB SQL restricted commands

* docs: update JIRA token location

* docs: update delete issue example

* docs: update find user by query example

* docs: remove session id from get assignable users

* docs: use correct image for get issues for board

* docs: update create issue example

* docs: update delete issue media

* docs: update assignable users media

* docs: update examples

* docs: update key desc

* docs: v2.68.0-Beta
2024-09-13 19:23:19 +05:30

6.8 KiB

id title
code-editor Code Editor

Code Editor

Code Editor widget is a versatile text editor for editing code and supports several languages.

ToolJet - Widget Reference - Code editor

Properties

:::info Any property having Fx button next to its field can be programmatically configured. :::

<div style={{ width:"100px"}}> Property <div style={{ width:"100px"}}> Description <div style={{ width:"135px"}}> Expected Value
Placeholder Specifies a hint that describes the expected value. This field requires a String value
Mode Specifies the language to be used for the code-editor. See info below for the list of all supported languages
Show line number Show or hides line numbers to the left of the editor. This fields expects a boolean value {{true}} or {{false}}

:::info

Supporting all commonly used languages.
  • APL
  • ASN.1
  • Asterisk dialplan
  • Brainfuck
  • C, C++, C#
  • Ceylon
  • Clojure
  • Closure Stylesheets (GSS)
  • CMake
  • COBOL
  • CoffeeScript
  • Common Lisp
  • Crystal
  • CSS
  • Cypher
  • Cython
  • D
  • Dart
  • Django (templating language)
  • Dockerfile
  • diff
  • DTD
  • Dylan
  • EBNF
  • ECL
  • Eiffel
  • Elixir
  • Elm
  • Erlang
  • Factor
  • FCL
  • Forth
  • Fortran
  • F#
  • Gas (AT&T-style assembly)
  • Gherkin
  • Go
  • Groovy
  • HAML
  • Handlebars
  • Haskell
  • Haxe
  • HTML embedded (JSP, ASP.NET)
  • HTML mixed-mode
  • HTTP
  • IDL
  • Java
  • JavaScript (JSX)
  • Jinja2
  • Julia
  • Kotlin
  • LESS
  • LiveScript
  • Lua
  • Markdown (GitHub-flavour)
  • Mathematica
  • mbox
  • mIRC
  • Modelica
  • MscGen
  • MUMPS
  • Nginx
  • NSIS
  • N-Triples/N-Quads
  • Objective C
  • OCaml
  • Octave (MATLAB)
  • Oz
  • Pascal
  • PEG.js
  • Perl
  • PGP (ASCII armor)
  • PHP
  • Pig Latin
  • PowerShell
  • Properties files
  • ProtoBuf
  • Pug
  • Puppet
  • Python
  • Q
  • R
  • RPM
  • reStructuredText
  • Ruby
  • Rust
  • SAS
  • Sass
  • Spreadsheet
  • Scala
  • Scheme
  • SCSS
  • Shell
  • Sieve
  • Slim
  • Smalltalk
  • Smarty
  • Solr
  • Soy
  • Stylus
  • SQL (several dialects)
  • SPARQL
  • Squirrel
  • Swift
  • sTeX, LaTeX
  • Tcl
  • Textile
  • Tiddlywiki
  • Tiki wiki
  • TOML
  • Tornado (templating language)
  • troff (for manpages)
  • TTCN
  • TTCN Configuration
  • Turtle
  • Twig
  • VB.NET
  • VBScript
  • Velocity
  • Verilog/SystemVerilog
  • VHDL
  • Vue.js app
  • Web IDL
  • WebAssembly Text Format
  • XML/HTML
  • XQuery
  • Yacas
  • YAML
  • YAML frontmatter
  • Z80
:::

Component Specific Actions (CSA)

There are currently no CSA (Component-Specific Actions) implemented to regulate or control the component.

Exposed Variables

<div style={{ width:"100px"}}> Variables <div style={{ width:"100px"}}> Description <div style={{ width:"135px"}}> How To Access
value This variable holds the value whenever the user inputs anything on the code-editor . Access the value dynamically using JS: {{components.codeeditor1.value}}

General

Tooltip

A Tooltip is often used to specify extra information about something when the user hovers the mouse pointer over the widget.

Under the General accordion, you can set the value in the string format. Now hovering over the widget will display the string as the tooltip.

Layout

<div style={{ width:"100px"}}> Layout <div style={{ width:"100px"}}> Description
Show on desktop Toggle on or off to display the widget in desktop view. You can programmatically determine the value by clicking on Fx to set the value {{true}} or {{false}}.
Show on mobile Toggle on or off to display the widget in mobile view. You can programmatically determine the value by clicking on Fx to set the value {{true}} or {{false}}.

Styles

<div style={{ width:"100px"}}> Styles <div style={{ width:"100px"}}> Description <div style={{ width:"100px"}}> Default Value
Visibility Toggle on or off to control the visibility of the widget. You can programmatically change its value by clicking on the Fx button next to it. If {{false}} the widget will not be visible after the app is deployed. By default, it's set to {{true}}
Disable This is off by default, toggle on the switch to lock the widget and make it non-functional. You can also programmatically set the value by clicking on the Fx button next to it. If set to {{true}}, the widget will be locked and becomes non-functional. By default, its value is set to {{false}}
Border radius Modifies the border radius of the editor. The field expects only numerical value from 1 to 100. Default is 0.