jbt / markdown-editor

Live (Github-flavored) Markdown Editor
http://jbt.github.com/markdown-editor
ISC License
2.82k stars 643 forks source link

Add print styles for output printing from browser (Ctrl+P) #60

Closed davidzoli closed 6 years ago

davidzoli commented 7 years ago

With these few lines of CSS, you will able to print out the output of the editor.

Just hit Ctrl+P and you will only see the only the output on the print preview. Same formatting as in the editor, but the input (markdown format) is not on the paper(s)

reeddunkle commented 7 years ago

This is awesome. I ended up manually doing this to save the output as a PDF. Can we get this merged?

reeddunkle commented 7 years ago

After testing this on multiple-page markdown, I found that when Printing (on Chrome to save as PDF) the page breaks it put in would cut the actual text in half (Pictured). It does this at every page break.

If you remove the last line of this code where you set width: 100%;, it solves this.

markdown_editor2

aero31aero commented 6 years ago

Hey! I manually merged this PR for now. Thanks a lot for working on this. I'm sorry if I didn't provide you credit for this code as of now, I was a noob with git when I merged it. I'll make sure to add your name soon when I add a small contributors list.

Looking forward to seeing more PRs from you, and hope you like the new UI.