There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
import type { Page } from '@playwright/test';
export async function pasteContent(
page: Page,
clipData: Record<string, unknown>
) {
await page.evaluate(
({ clipData }) => {
const e = new ClipboardEvent('paste', {
clipboardData: new DataTransfer(),
});
Object.defineProperty(e, 'target', {
writable: false,
value: document,
});
Object.keys(clipData).forEach(key => {
e.clipboardData?.setData(key, clipData[key] as string);
});
document.dispatchEvent(e);
},
{ clipData }
);
await page.waitForTimeout(100);
}