react-codemirror icon indicating copy to clipboard operation
react-codemirror copied to clipboard

Disable drag and drop fonctionnality

Open mickeldebs opened this issue 2 years ago • 1 comments

Is there a way to disable drag and drop? I saw that there is a dragDrop property but don't know where to put it. Also tried to add event extensions and return false on drop but nothing seems to work

mickeldebs avatar Nov 29 '22 12:11 mickeldebs

https://github.com/uiwjs/react-codemirror/blob/73b518e0601409e0f113a62cad89355a5115396c/extensions/events/README.md?plain=1#L92-L131

npm install @uiw/codemirror-extensions-events --save
import * as events from '@uiw/codemirror-extensions-events';
const extension1 = events.scroll({
  scroll: (evn) => {
    console.log(evn.target.scrollTop);
  },
});
const extension2 = events.content({
  focus: (evn) => {
    console.log('focus');
  },
  blur: (evn) => {
    console.log('blur');
  },
});

@mickeld23 https://uiwjs.github.io/react-codemirror/#/extensions/events

jaywcjlove avatar Dec 07 '22 13:12 jaywcjlove