- 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.
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.
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.
Hm tested it on chrome and it seems to scroll correctly. The black window "stops" at the bottom of the page, whereas on firefox (possibly with non-default font settings), it is trying to go below the bottom of the window.
I would like to use markdown in the contenteditable area
I expect it to recognize that I mean bold
when I write jooo -- otherwise I would be stuck using
the GUI buttons every time I want to change something.
It might be complicated to do (ex: I have entered the left but not right yet...), but it might also be simple;
just watch the contenteditable area and pass it through some basic REs.
That is a long-wanted feature in Hallo, not only when producing Markdown, but also when Rich Text Editing normal HTML. Would be great for power users.
Feel free to add comments to:
(we're having an IKS hack week in Saarbrucken now, and Hallo is one of the focus areas. So something might actually happen around this)
1. Doing an html to markdown conversion, as you seem to be doing, feels like a giant hack. And one with leaky abstractions to boot (Hit enter off the end of a list, and you get <div></div> inserted into the markdown source).
2. Link editing is super important, and, also a very difficult problem (selection/range management issues) without the html to markdown problem added on top.
I think something like this is doable by having the transformation only happen one way (from markdown to html), given a markdown parser with full access to the parse tree. However, there's many other issues that would arise from doing it that way.
There's pagedown which is used on Stackoverflow.
Imagine you build a simple website for someone and allow them to edit it. You could give them a WYSIWYG editor with formatting buttons but those editors usually override some of your styles and produce messy code. Or you can give them this Markdown WYSIWYG editor and in most cases it's easier to be sure it won't override your styles and keeps the focus on content. I love that idea. I've had lots of success with teaching very non-tech savvy people markdown in 5 minutes flat. And since most markdown converters I know produce very minimal clean HTML i can be sure my styles won't be overridden. Compare that to something like Wordpress' editor which produces all sorts of sloppy, obsolete code riddled with spans and stuff that overrides my CSS and this is awesome!
So what I'm saying is that Markdown isn't just for text editors. It's for anything that requires the final product to be nicely formatted and the raw code to still he human readable. One of my current hobby projects is an online notes app that automatically converts your writing to Markdown if you use it and I love it. (https://writeapp.me - shameless plug for sure)
Boring: It just shows the rendered markdown next to the raw markdown. More interesting would be a solution that uses the same space to show the rendered form and for user input. E.g. as you type "cool" the asterisks disappear and instead you see the italicized word.
Not WYSIWYG: What-you-see-is-what-you-get means you visually present to the user all the options available. The user should not have to happen to know a set of magic incantations. Markdown requires magic incantations. Some users know them, many users do not. If you want to eliminate toolbar buttons, do something like iOS where when you highlight a word you get hovering format buttons.
Yeah, the floating toolbar like iOS. Cool stuff. I won't know if it's really useable for me until I try writing one of my reports in it. (One of my team's tools uses Markdown to generate emailed reports. It can be painful sometimes.)
It would be interesting to see whether we could collaborate on some widgets that could work on both.
(Disclaimer: I wrote it)
You can see a more fully-featured configuration of Hallo in these screencasts: http://blog.iks-project.eu/semantic-enhanced-cmf-editor-now-...