News for hackers. Stuff that matters.
Re:Show HN: WYSIWYG-editing Markdown with Hallo Editor by pyre on Tuesday March 27, 2012 @12:15PM (#3762316)
Highlighted some text in the middle of the paragraph. Attempted to change formatting to "H2". The entire paragraph became "H2", and in the text below the "##" ended up on the line above the paragraph, which I don't think is valid Markdown. To be fair, this is an edge-case. Maybe don't show header formatting as an option in the middle of a block of text?

Other suggestions:

- Tooltips! I didn't know what the bullet list button was until I pressed it.

- Selecting text in the middle of a paragraph and choosing a header type or pre or blockquote affects the whole paragraph. This isn't immediately intuitive. I don't have a good solution to this, but it's something to consider.

- Once I select text in the middle of a paragraph and mark it as pre there doesn't seem to be a way to back out this change, selecting blockquote just embeds a blockquote in the pre block. Note, this may have happened because I selected different blocks of text within the paragraph for each change, but since it affects the entire paragraph it makes sense for this to not matter.

[update] The <= and => icons are not intuitive as undo/redo. I thought that they were for indentation before I hit them. Also note that I backed out all of my changes, yet still ended up with a <pre> surrounding the text at the bottom, even though it clearly wasn't there in the WYSIWYG at the top. Adding <pre> to the paragraph again didn't cause a double-<pre> down below though.

Re:Show HN: WYSIWYG-editing Markdown with Hallo Editor by bergie on Tuesday March 27, 2012 @04:21PM (#3763411)
Tooltips!

Good point! Done: https://github.com/bergie/hallo/commit/259c6172e475188f01fd9...

Selecting text in the middle of a paragraph and choosing a header type or pre or blockquote affects the whole paragraph. This isn't immediately intuitive. I don't have a good solution to this, but it's something to consider.

Yeah, this is what browsers do by default when issuing commands to the contentEditable. The way to fix this would be to recognize the command before it issued and splitting the text before and after a selection to their own block-level elements.

https://github.com/bergie/hallo/issues/54

Once I select text in the middle of a paragraph and mark it as pre there doesn't seem to be a way to back out this change, selecting blockquote just embeds a blockquote in the pre block.

Yeah, pre is kind of difficult to handle. I'm thinking about solutions. Previous Hallo didn't have pre enabled to work around this, but I really would like to be able to add code snippets when I write.

The <= and => icons are not intuitive as undo/redo.

I'm using FontAwesome, and they will hopefully add a proper undo at some point (https://github.com/FortAwesome/Font-Awesome/issues/16).

The actual undo/redo implementation comes from the browser, so it is a bit hard to do much about it. But whenever we get to doing OT with ShareJS there might come a better way to handle editing history.