Seriously, this is just `window.print()`...
Inspect->Events->onClick
function() {
return window.print()
}
Though the codemirror stuff is probably a bit more work.Nothing wrong with that, but a project named "md2pdf" juxtaposed with onClick={window.print} is unexpected.
And I found the powerful way was browser print. It allows you zoom rate/choose page range.
So, I dig in CSS media query and try to compatible cross browser(Chrome&FF).
I made an editor in left side just cause sometimes we want edit some typo or something before convert...haha, codemirror makes a good user experience than textarea.
I was kind of expecting that the PDF generation is done with some script like https://github.com/mrrio/jspdf and then rendered with https://github.com/mozilla/pdf.js :)