mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Copy clipboard command in ADS (html/plain text supported) (#13527)
* draft commit * few changes * Changes to copy query with results in plain and html formatting * undo changes * undo unintended change * remove comments * Addressed comments * Some clean up Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { ClipboardData, IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; // {{SQL CARBON EDIT}}
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
@@ -20,6 +20,11 @@ export class NativeClipboardService implements IClipboardService {
|
||||
@IElectronService private readonly electronService: IElectronService
|
||||
) { }
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
async write(data: ClipboardData, type?: 'selection' | 'clipboard'): Promise<void> {
|
||||
return this.electronService.writeClipboardData(data, type);
|
||||
}
|
||||
|
||||
async writeText(text: string, type?: 'selection' | 'clipboard'): Promise<void> {
|
||||
return this.electronService.writeClipboardText(text, type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user