Hi!
I'm trying to add modules to my Monaco editor but I don't know how to access to the monaco instance for doing that.
This is what I'm trying to do right now:
that.initEditor = () => {
that.editor = RED.editor.createEditor({
id: 'script-editor',
mode: 'typescript',
value: that.oldValue,
fontLigatures: true
});
//now I want to change properties in my editor
if(that.editor && that.editor.type === "monaco"){
//ACCESS TO MONACO INSTANCE
const tsDefaults = monaco.languages.typescript.typescriptDefaults;
functionsDeclaration.forEach(fd =>
typeModels.push(tsDefaults.addExtraLib(fd.content, fd.filename))
)
}
I also want to configure my diagnostics options via: tsDefaults.setDiagnosticsOptions({}).
Can you help me, please?
Thank you!