# Is there any way of adding additional language support in a node that I'm developing with the Monaco Editor?

**URL:** https://discourse.nodered.org/t/is-there-any-way-of-adding-additional-language-support-in-a-node-that-im-developing-with-the-monaco-editor/86721
**Category:** Developing Nodes
**Created:** [24 March 2024 20:17 UTC](https://discourse.nodered.org/t/is-there-any-way-of-adding-additional-language-support-in-a-node-that-im-developing-with-the-monaco-editor/86721 "2024-03-24T20:17:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![RafaelMuynarsk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rafaelmuynarsk/32/26492_2.png) [@RafaelMuynarsk](https://discourse.nodered.org/u/RafaelMuynarsk)
#### Post date: [24 March 2024 20:17 UTC](https://discourse.nodered.org/t/is-there-any-way-of-adding-additional-language-support-in-a-node-that-im-developing-with-the-monaco-editor/86721/1 "2024-03-24T20:17:23Z")

</div>

When the official editor of Node-RED was the Ace editor, even though it couldn't support all languages of the Ace editor, I still had the option of getting additional languages on their GitHub page, just so I could develop a node with support for other languages than the ones that Node-RED support by default... The page where I can find additional languages for the Ace Editor is this one:

> **[ace-builds/src-min-noconflict at master · ajaxorg/ace-builds](https://github.com/ajaxorg/ace-builds/tree/master/src-min-noconflict)**
>
> Packaged version of Ace code editor. Contribute to ajaxorg/ace-builds development by creating an account on GitHub.

However, I'd like to add additional languages to the Monaco editor since Node-RED is moving towards making it the default one... But checking the source code I see that the languages in Monaco seem to be all included in the file `node-red/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/editor.js`... And I can only use the languages that are officially supported in Monaco

[https://microsoft.github.io/monaco-editor/](https://microsoft.github.io/monaco-editor/)

I'd like to add support for LaTex in the editor of my node though, I've found a file for highlight syntax that Monaco supports

> <https://github.com/koka-lang/madoko/blob/master/styles/lang/latex.json>

But I'm not sure if I can use it in Node-RED. Is it possible? Can I add additional languages to the editor of a node that I'm developing if I have a file with the Monarch syntax highlighting?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 March 2024 20:57 UTC](https://discourse.nodered.org/t/is-there-any-way-of-adding-additional-language-support-in-a-node-that-im-developing-with-the-monaco-editor/86721/2 "2024-03-24T20:57:19Z")

</div>

There is no API support in node-red - that would be the optimal way. If you feel up to the challenge you could contribute this to the node-red core

Alternatively you can programmatically setup a language direct on the monaco object. That's how we add JSONata support. However there are no guarantees future updates to node-red (and Monaco) would not break your node.

You can access the monaco object in `window.monaco` and configure your language support.

See how we did this for JSONata in the node-red src: [node-red/packages/node\_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js at 37265cf4ef69571c0edc608189826da9504d1fde · node-red/node-red · GitHub](https://github.com/node-red/node-red/blob/37265cf4ef69571c0edc608189826da9504d1fde/packages/node_modules/%40node-red/editor-client/src/js/ui/editors/code-editors/monaco.js#L409)

---

<div class="post-metadata">

### Author: ![RafaelMuynarsk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rafaelmuynarsk/32/26492_2.png) [@RafaelMuynarsk](https://discourse.nodered.org/u/RafaelMuynarsk)
#### Post date: [25 March 2024 15:53 UTC](https://discourse.nodered.org/t/is-there-any-way-of-adding-additional-language-support-in-a-node-that-im-developing-with-the-monaco-editor/86721/3 "2024-03-25T15:53:17Z")

</div>

Thanks, I'll try doing it directly in my node by now.

But just as a curiosity, what would be the general procedure for doing it in an optimal way?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [25 March 2024 15:56 UTC](https://discourse.nodered.org/t/is-there-any-way-of-adding-additional-language-support-in-a-node-that-im-developing-with-the-monaco-editor/86721/4 "2024-03-25T15:56:16Z")

</div>

A discussion on design of the API then, once agreed, a pull request against the `dev` branch on the node-red repo is the way to go.

We can get a design discussion opened if you wish to travel down this path. Just let me know.

---

<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: [24 May 2024 15:56 UTC](https://discourse.nodered.org/t/is-there-any-way-of-adding-additional-language-support-in-a-node-that-im-developing-with-the-monaco-editor/86721/5 "2024-05-24T15:56:30Z")

</div>

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