Using Monaco editor - monaco branch now in fork (PR#2971)

Julian, I have found a reliable way to determine clientside vs serverside JS editor so there is nothing for you to do - it just works

That said...

in uibuilder, you have a function that attempts to determine the editor type called fileType (link) essentially, you attempt sanitise the editor type required for the file before setting the ACE mode.

In this case, you end up passing text for many types that are actually supported by monaco. e.g. in, SCSS looks like this (your function passed in "text" for the mode)...

But if I force the type (mode) to "scss", it looks like this...

1rAhfXRTVp

preparation suggestion...

If ACE gracefully defaults to a plain mode when it doesnt recognise the requested type (mode), perhaps you could modify the fileType function & let the default return be the actual file extension (or "text" if empty) - then it will be ready for when (if) monaco lands.

PR getting closer :wink:


EDIT...
ACE also supports SCSS mode btw.

1 Like