File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { NativeAdapter } from "./adapter/native.adapter.class" ;
2
2
3
+ /**
4
+ * {@link Clipboard } class gives access to a systems clipboard
5
+ */
3
6
export class Clipboard {
7
+ /**
8
+ * {@link Clipboard } class constructor
9
+ * @param nativeAdapter {@link NativeAdapter } instance used to access OS API
10
+ */
4
11
constructor ( private nativeAdapter : NativeAdapter ) {
5
12
}
6
13
14
+ /**
15
+ * {@link copy } copies a given text to the system clipboard
16
+ * @param text The text to copy
17
+ */
7
18
public copy ( text : string ) : Promise < void > {
8
19
return this . nativeAdapter . copy ( text ) ;
9
20
}
10
21
22
+ /**
23
+ * {@link paste } pastes the current content of the system clipboard (limited to text)
24
+ */
11
25
public paste ( ) : Promise < string > {
12
26
return this . nativeAdapter . paste ( ) ;
13
27
}
You can’t perform that action at this time.
0 commit comments