Printing from the Atom editor
Posted by jpluimers on 2017/05/04
Atom is a great editor, but printing from it is still lacking, even though the issue has been opened again.
There is export-html, but it only prints the current source code, not the built-in Markdown Preview or add-on reStructuredText Preview Pandoc packages “Toggle Preview” views.
By name print-atom looks promising, but contrary to the advertised “Print current atom window using print dialog”, it prints the whole Atom UI, which is of no use at all.
Then there is broadcast which at first only worked for me in 1.6.2 but not in 1.7.2. I even removed the whole ~/.atom directory to get it working: to no avail. It finally occurred to me that in the lower right there was a tiny red icon (which was blue in 1.6.2).
Below is the process to fix broadcast, and after that you can live-view from your web browser through http://localhost:8000 either of the rendered source text in the Atom editor, or the Preview pane in the Atom editor.
Even though hardly documented, these are the broadcast settings:

Only enable “Broadcast To Others” if you want to access port 8000 from another machine.
Getting broadcast to work again
- wasn’t caused by changes in the theming between 1.6.2 and 1.7.2 (where lots of colours changed)
- wasn’t just an adornment: it’s in fact clickable
As soon as you click it you see this in the right pane:
It is odd as I started with no ~/.atom directory at all.
Anyway: clicking the “Rebuild Packages” starts a process that takes quite a while.
Now after restarting Atom, you can view the broadcast on http://localhost:8000
–jeroen
Leave a Reply