# Feature Request: Add prettify/beautify to function nodes

**URL:** <https://discourse.nodered.org/t/feature-request-add-prettify-beautify-to-function-nodes/33196>\
**Category:** Feature Requests\
**Created:** [22 September 2020 20:57 UTC](https://discourse.nodered.org/t/feature-request-add-prettify-beautify-to-function-nodes/33196 "2020-09-22T20:57:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [23 September 2020 04:57 UTC](https://discourse.nodered.org/t/feature-request-add-prettify-beautify-to-function-nodes/33196/2 "2020-09-23T04:57:50Z")

</div>

While it is technically doable to hook something like JS-Beautify into the underlying ACE editor, I think there is a greater picture to consider.

Code formatting is a very diverse topic, everyone has a different view of how the code should be formatted.  
Also, it's another library that has to be integrated, kept up-to-date and increases the download size of the editor UI.

From my experience, I have managed without that, because ACE is quite clever regarding auto-indentation and other little helpers. That only helps when typing code directly in the editor area, of course, not when you copy/paste from somewhere else. Occasionally, I copy/paste badly formatted code into VScode.

There has also been some work of integrating the Monaco editor instead of ACE. It's the editor used by VScode.

> [@Using Monaco editor - monaco branch now in fork (PR#2971)](https://discourse.nodered.org/t/using-monaco-editor-monaco-branch-now-in-fork/26561):
>
> UPDATE: 1-May-2021 - use monaco2 branch git clone [https://github.com/Steve-Mcl/node-red.git](https://github.com/Steve-Mcl/node-red.git) cd node-red git checkout monaco use monaco2 branch git checkout monaco2 npm install npm run build npm start notes: you can chose which editor to use by modifying your settings.js to include editorTheme.codeEditor.lib = "monaco" like this... // Customising the editor editorTheme: { projects: { // To enable the Projects feature, set this value to true enabled: …

---

_[View the full topic](https://discourse.nodered.org/t/feature-request-add-prettify-beautify-to-function-nodes/33196)._
