monaco-react
monaco-react copied to clipboard
[Feature request] Add new prop to custom own model's file extension
Is your feature request related to a problem? Please describe.
I am try to enable tsx support in editor, following this gist, and the file of own model should having a .tsx extension.
but currently the Editor props has no proper ways to custom the file extension, prop path can change the own model's extension. but it will cause problem when multiple editors exists (different editor shows the same code, because of the same model uri)
for now, I just add unique id for each editor's path prop. but it will be easier to use if can custom the extension of own model
path={`inmemory://model/${filenameRef.current}.tsx`}
Describe the solution you'd like
mybe add a new prop defaultExtension