How can Node-RED be configured so that the function node editor uses spaces instead of tabs and that the indentation level is set to two spaces instead of 4? This applies to all nodes that allow multiline text to be edited.
That is not something that is currently exposed to end users in any way.
At some point on the future we'll expose customisation options for the editor widget, but that isn't there today.