File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ interface MarkEdit {
6464 showAlert(alert : Alert ): Promise <number >;
6565 // Present a text box to receive user input.
6666 showTextBox(textBox ? : TextBox ): Promise <string | undefined >;
67+ // Present a save panel for saving the file.
68+ showSavePanel(options : SavePanelOptions ): Promise <number >;
6769}
6870```
6971
Original file line number Diff line number Diff line change @@ -164,6 +164,13 @@ export interface MarkEdit {
164164 * @returns The input string, or undefined if no value is provided.
165165 */
166166 showTextBox ( textBox ?: TextBox ) : Promise < string | undefined > ;
167+
168+ /**
169+ * Present a save panel for saving the file.
170+ * @param options The panel information, including the data and optionally a default file name.
171+ * @returns True if the file was successfully saved.
172+ */
173+ showSavePanel ( options : SavePanelOptions ) : Promise < boolean > ;
167174}
168175
169176/**
@@ -358,3 +365,23 @@ export type TextBox = {
358365 placeholder ?: string ;
359366 defaultValue ?: string ;
360367} | string ;
368+
369+ /**
370+ * Represents options to show the save panel.
371+ */
372+ export type SavePanelOptions = {
373+ /**
374+ * String representation of the file, if applicable.
375+ */
376+ string ?: string ;
377+
378+ /**
379+ * Base64 representation of the file, if applicable.
380+ */
381+ data ?: string ;
382+
383+ /**
384+ * Default file name.
385+ */
386+ fileName ?: string ;
387+ } ;
You can’t perform that action at this time.
0 commit comments