News for hackers. Stuff that matters.
Re:Ghost: The Future of Blogging (Node.js) by spion on Monday April 29, 2013 @11:03AM (#5626575)
I love the markdown editor, especially the auto-scrolling feature.

The only problem is that it doesn't really scroll to the part you're editing - instead it assumes that if you've scrolled to 50% in the markdown code, the preview should also scroll to 50%. Add a couple of images and this assumption becomes false.

I know this is hard to do (involves hooking into the markdown parser) but it would truly be a killer feature.

Re:Ghost: The Future of Blogging (Node.js) by bhauer on Monday April 29, 2013 @11:27AM (#5626771)
I posted this in the other thread, so I apologize if it's redundant. I agree, auto-scrolling the preview panel is important. In my personal blog, I didn't use Markdown, but rather just plain HTML (with some minor tweaks). What I did to synchronize the editor and preview was:

1. Find the shortest path out of a currently-edited tag (look to see if the cursor is between a nearby set of < and > characters). In most cases, the cursor is not in a tag, so this is not needed.

2. Insert an empty marker span.

3. Find that span in the preview pane.

4. Find the span's parent block, add a class to that block to highlight it, and then scroll to its location.

Seen here: http://tiamat.tsotech.com/images/tiamat-authoring-2012-10.pn... (the yellow paragraph at the bottom right)