How to use mode: "editor" to create a new document?

Docs state that with editor mode id is needed for the file to open. How would I create a new file ?
When I pass null as an id it opens the default ui, when I pass in an existing id it says I have no access to the room.

How do I create a new file and show the editor directly when calling DocSpace.SDK.initManager ?

Hello @joer00,
Could you describe the step-by-step scenario in more detail?

Not sure what step by step scenario you mean ?
I want to click a button on my page “New Spreadhseet” and it should create a new spreadsheet I can edit.

Hello @joer00
Before opening a file for editing, you need to create the file and pass its ID when opening it for editing.

Here is the link to documentation:
https://api.onlyoffice.com/docspace/javascript-sdk/usage-sdk/samples/create-file-in-selected-folder/