expose client.writeTextToClipboard
Summary: per title Reviewed By: priteshrnandgaonkar Differential Revision: D27044508 fbshipit-source-id: 8af99f66ec8203b76ccb3d880e1a184193a389c7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4e2383cdb0
commit
7093a932f8
@@ -86,6 +86,11 @@ export interface BasePluginClient {
|
|||||||
* Clicking the notification will open this plugin. If the `action` id is set, it will be used as deeplink.
|
* Clicking the notification will open this plugin. If the `action` id is set, it will be used as deeplink.
|
||||||
*/
|
*/
|
||||||
showNotification(notification: Notification): void;
|
showNotification(notification: Notification): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes text to the clipboard of the Operating System
|
||||||
|
*/
|
||||||
|
writeTextToClipboard(text: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
let currentPluginInstance: BasePluginInstance | undefined = undefined;
|
let currentPluginInstance: BasePluginInstance | undefined = undefined;
|
||||||
@@ -272,6 +277,7 @@ export abstract class BasePluginInstance {
|
|||||||
this.menuEntries.push(normalizeMenuEntry(entry));
|
this.menuEntries.push(normalizeMenuEntry(entry));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
writeTextToClipboard: this.flipperLib.writeTextToClipboard,
|
||||||
createPaste: this.flipperLib.createPaste,
|
createPaste: this.flipperLib.createPaste,
|
||||||
GK: this.flipperLib.GK,
|
GK: this.flipperLib.GK,
|
||||||
showNotification: (notification: Notification) => {
|
showNotification: (notification: Notification) => {
|
||||||
|
|||||||
@@ -295,6 +295,12 @@ interface Notification {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### `writeTextToClipboard`
|
||||||
|
|
||||||
|
Usage: `writeTextToClipboard(text: string)`
|
||||||
|
|
||||||
|
Writes text to the OS-level clipboard.
|
||||||
|
|
||||||
#### `createPaste`
|
#### `createPaste`
|
||||||
|
|
||||||
Facebook only API.
|
Facebook only API.
|
||||||
|
|||||||
Reference in New Issue
Block a user