1 | import { MimeData } from '@lumino/coreutils';
|
2 | export type ClipboardData = string | MimeData;
|
3 | /**
|
4 | * The clipboard interface.
|
5 | */
|
6 | export declare namespace Clipboard {
|
7 | /**
|
8 | * Get the application clipboard instance.
|
9 | */
|
10 | function getInstance(): MimeData;
|
11 | /**
|
12 | * Set the application clipboard instance.
|
13 | */
|
14 | function setInstance(value: MimeData): void;
|
15 | /**
|
16 | * Copy text to the system clipboard.
|
17 | *
|
18 | * #### Notes
|
19 | * This can only be called in response to a user input event.
|
20 | */
|
21 | function copyToSystem(clipboardData: ClipboardData): void;
|
22 | /**
|
23 | * Generate a clipboard event on a node.
|
24 | *
|
25 | * @param node - The element on which to generate the event.
|
26 | *
|
27 | * @param type - The type of event to generate.
|
28 | * `'paste'` events cannot be programmatically generated.
|
29 | *
|
30 | * #### Notes
|
31 | * This can only be called in response to a user input event.
|
32 | */
|
33 | function generateEvent(node: HTMLElement, type?: 'copy' | 'cut'): void;
|
34 | }
|