- // Handle image & content drag n drop
- // TODO
- // cm.on('drop', (cm, event) => {
- //
- // const templateId = event.dataTransfer.getData('bookstack/template');
- // if (templateId) {
- // event.preventDefault();
- // editor.actions.insertTemplate(templateId, event.pageX, event.pageY);
- // }
- //
- // const clipboard = new Clipboard(event.dataTransfer);
- // const clipboardImages = clipboard.getImages();
- // if (clipboardImages.length > 0) {
- // event.stopPropagation();
- // event.preventDefault();
- // editor.actions.insertClipboardImages(clipboardImages);
- // }
- //
- // });
+ // Add editor view to window for easy access/debugging.
+ // Not part of official API/Docs
+ window.mdEditorView = cm;