我一直在努力地将复制的片段传递到onCopy
钩子中,但无济于事。
我尝试使用event.clipboardData...
来实现。
const { clipboardData } = event;
const encoded = clipboardData.getData("application/x-slate-fragment");
但是它看起来很空。我也试过使用getEventTransfer
工具,但它返回{type: 'unknow'}
这里是我一直在测试的 CodeSandBox。