Copy/Paste implementation

Summary: ^

Reviewed By: aigoncharov

Differential Revision: D46515194

fbshipit-source-id: 0ee6931569d5248d5643b391683e230e0c095e41
This commit is contained in:
Lorenzo Blasa
2023-06-07 06:04:46 -07:00
committed by Facebook GitHub Bot
parent b9322247e6
commit 2815ba0fb8
5 changed files with 10 additions and 16 deletions

View File

@@ -35,12 +35,11 @@ export function initializeRenderHost(
flipperServerConfig: FlipperServerConfig,
) {
FlipperRenderHostInstance = {
readTextFromClipboard() {
// TODO:
return undefined;
async readTextFromClipboard() {
return await navigator.clipboard.readText();
},
writeTextToClipboard(_text: string) {
// TODO:
writeTextToClipboard(text: string) {
return navigator.clipboard.writeText(text);
},
async importFile() {
throw new Error('Not implemented');
@@ -71,7 +70,7 @@ export function initializeRenderHost(
);
},
restartFlipper() {
window.flipperShowError!(
window.flipperShowError?.(
'Flipper settings have changed, please restart flipper server for the changes to take effect',
);
},