mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-30 13:20:45 +08:00
init: the first public commit for AFFiNE
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { get, set, del } from 'idb-keyval';
|
||||
|
||||
// Used for clipboard
|
||||
|
||||
const ID = 'tldraw_clipboard';
|
||||
|
||||
export async function getClipboard(): Promise<string | undefined> {
|
||||
return get(ID);
|
||||
}
|
||||
|
||||
export async function setClipboard(item: string): Promise<void> {
|
||||
return set(ID, item);
|
||||
}
|
||||
|
||||
export function clearClipboard(): Promise<void> {
|
||||
return del(ID);
|
||||
}
|
||||
Reference in New Issue
Block a user