ctx.registerFileType
Declare a file type the app knows about (label + owned extensions), and optionally make it creatable from the "New File" surfaces. Independent of viewers: a file type describes the format, a viewer renders it.
ts
ctx.registerFileType(type: FileType): DisposableExample
tsx
ctx.registerFileType({
id: "acme.foo",
label: "Foo File",
extensions: [".foo"],
newFile: { defaultName: "Untitled" },
});Types
Pass FileType.
Related: NewFileTemplate.
See also
Other Registration members on ctx.