const onScrollDebounced = debounce(editor.actions.syncDisplayPosition.bind(editor.actions), 100, false);
let syncActive = editor.settings.get('scrollSync');
- editor.settings.onChange('scrollSync', val => syncActive = val);
+ editor.settings.onChange('scrollSync', val => {
+ syncActive = val;
+ });
const domEventHandlers = {
// Handle scroll to sync display view
editor.actions.insertClipboardImages(clipboardImages, event.pageX, event.pageY);
}
},
+ // Handle dragover event to allow as drop-target in chrome
+ dragover: event => {
+ event.preventDefault();
+ },
// Handle image paste
paste: event => {
const clipboard = new Clipboard(event.clipboardData || event.dataTransfer);