# Editor - colored keywords

**URL:** https://discourse.nodered.org/t/editor-colored-keywords/28456
**Category:** General
**Created:** [17 June 2020 08:09 UTC](https://discourse.nodered.org/t/editor-colored-keywords/28456 "2020-06-17T08:09:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![softy2k](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/softy2k/32/23707_2.png) [@softy2k](https://discourse.nodered.org/u/softy2k)
#### Post date: [17 June 2020 08:09 UTC](https://discourse.nodered.org/t/editor-colored-keywords/28456/1 "2020-06-17T08:09:29Z")

</div>

In Editor, most reserved keywords are automatically colored.

But, there are some that are (not yet) colored, such as: `hasOwnProperty`,` trim` (msg.payload.trim ()) etc.

What is the possibility of them being colored automatically ?

---

<div class="post-metadata">

### Author: ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)
#### Post date: [17 June 2020 08:46 UTC](https://discourse.nodered.org/t/editor-colored-keywords/28456/2 "2020-06-17T08:46:40Z")

</div>

The coloring ability is dependent on the ACE editor which is embedded within Node-RED. I doubt it makes sense for the devs to start modifying it. Naturally only Nick/Dave can answer this.

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [17 June 2020 10:08 UTC](https://discourse.nodered.org/t/editor-colored-keywords/28456/3 "2020-06-17T10:08:28Z")

</div>

Compared to a full-featured IDE or rich editors like VSCode with a language server and all that, ACE can only make basic assumptions about the semantics and types in the script.

One should also keep in mind that `hasOwnProperty` and ` trim` aren't JS language keywords, those are just regular functions on certain objects. And since `msg.payload` could be anything, `trim()` won't get any special highlighting.

So I doubt there will ever be any 'advanced' highlighting (or advanced code completion) in ACE.

A forum member tried to integrate the Monaco editor: [Using Monaco editor - monaco branch now in fork](https://discourse.nodered.org/t/using-monaco-editor-monaco-branch-now-in-fork/26561)  
From what I saw it would offer some more features regarding all that, but that is all just a proof-of-concept at the moment.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [16 August 2020 10:08 UTC](https://discourse.nodered.org/t/editor-colored-keywords/28456/4 "2020-08-16T10:08:30Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
