Another nice feature you can provide for your small markdown editor application is the ability to drag and drop files onto the window. Users of your application should have the ability to drop a markdown file onto the editor's surface and have the content of the file immediately available to them. This scenario also helps us address some extra features of the Electron framework that you may use later. Let's get started:
- The easiest way to enable drop support for an entire web page running in Electron is to set the ondrop event handler for the body element:
<body ondrop="dropHandler(event);">
<!-- page content -->
</body>
- For now, the drop handler implementation can be as simple as putting a message into the browser console's output. The most important part here is to prevent the default...