Files
notesnook/packages/editor/test.js
2022-06-02 07:26:44 +05:00

15 lines
505 B
JavaScript

const text = event.clipboardData.getData("text/plain");
const vscode = event.clipboardData.getData("vscode-editor-data");
const vscodeData = vscode ? JSON.parse(vscode) : undefined;
const language = vscodeData?.mode;
if (!text || !language) {
}
const { tr } = view.state;
const indent = detectIndentation(text);
// create an empty code block
tr.replaceSelectionWith(
);