User
i want to disallow paste in codemirror editor in v6.
i thought that we can do it we can do it this code, but we can’t do it error that is “Type ‘() => boolean’ is not assignable to type ‘string’”.
const view = new EditorView({
state: EditorState.create({
extensions: [
EditorView.contentAttributes.of({
onpaste: (): Boolean => false
}),
...extensions
],
}),
parent: ref.current,
});
Do we have any solution?