I set up a custom button to initiate drawing as per How to click a button and start a new polygon without using the Leaflet.draw UI and How to initiate the draw function without toolbar?. However, once someone clicks on this custom button, I can't figure out how to imitate the behaviour of the Cancel
button so that I can have something like
<input type="button" onclick="stopEdits()" value="Click to Stop Drawing">
function stopEdits() {
//Cancel Drawing
}