Export to Markdown (#20661)

* Give saveAsExcel its own config options

* Wired up correctly

* Merge conflicts

* PR comments 1

Co-authored-by: Ben Russell <russellben@microsoft.com>
This commit is contained in:
Benjamin Russell
2022-10-13 18:08:21 -05:00
committed by GitHub
parent bee1c6be44
commit 38eb0c8429
13 changed files with 216 additions and 14 deletions

View File

@@ -287,6 +287,14 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
handler: gridCommands.saveAsJson
});
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: gridActions.GRID_SAVEMARKDOWN_ID,
weight: KeybindingWeight.EditorContrib,
when: ResultsGridFocusCondition,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyR, KeyMod.CtrlCmd | KeyCode.KeyM),
handler: gridCommands.saveAsMarkdown
});
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: gridActions.GRID_SAVEEXCEL_ID,
weight: KeybindingWeight.EditorContrib,
@@ -384,6 +392,21 @@ const queryEditorConfiguration: IConfigurationNode = {
'description': localize('queryEditor.results.saveAsCsv.encoding', "File encoding used when saving results as CSV"),
'default': 'utf-8'
},
'queryEditor.results.saveAsMarkdown.encoding': {
'type': 'string',
'description': localize('queryEditor.results.saveAsMarkdown.encoding', "File encoding used when saving results as Markdown"),
'default': 'utf-8'
},
'queryEditor.results.saveAsMarkdown.includeHeaders': {
'type': 'boolean',
'description': localize('queryEditor.results.saveAsMarkdown.includeHeaders', "When true, column headers are included when saving results as a Markdown file"),
'default': true
},
'queryEditor.results.saveAsMarkdown.lineSeparator': {
'type': 'string',
'description': localize('queryEditor.results.saveAsMarkdown.lineSeparator', "Character(s) to use to separate lines when exporting to Markdown, defaults to system line endings"),
'default': null
},
'queryEditor.results.saveAsXml.formatted': {
'type': 'boolean',
'description': localize('queryEditor.results.saveAsXml.formatted', "When true, XML output will be formatted when saving results as XML"),