Making markdown opt-in rather than default

BK Benjamin Knight Public Seen by 48

I've seen some cases where markdown has badly messed up the formatting of the discussion context panel, particularly when people cut and paste text in from other places.

I think markdown is awesomely useful when people know how to use it, but that's a small minority of our users. Would be super keen to switch it to opt-in. I'm suggesting this as a short-term quick fix - ideally it would be awesome to have a basic formatting GUI like Gmail, so ability to format text isn't limited to the tech-literate.



Jon Lemmon Wed 14 Nov 2012 6:24AM

Agreed. Can we think of a user-friendly way to do this? So this would apply to both comments and the context panel?


Paul Smith Wed 14 Nov 2012 11:17PM

Would it work if we just added a small tick box next to the save button for the context panel?


Jon Lemmon Wed 14 Nov 2012 11:20PM

Yeah, not a bad idea... maybe something like "Enable improved formatting for this post (see more)"?

See more could be a link to our markdown guide...


Scott Lemmon Thu 15 Nov 2012 12:05AM

I really like the way the Stack Exchange sites do it. There is a preview pane of your post and a really formatting bar for basic controls such as bold, italic, quote and such.

I found a ruby gem the other day for markdown preview that should plug in to the post comment area pretty easily.

If we had this functionality it would not only allow people to preview their posts to make sure the formatting isn't messed up, but also would encourage the use of markdown... which can really serve to make a post much more readable.

In other words, I think instead of disabling the functionality and then making it have to be enabled manually, we should make it easier to use and learn about, and then perhaps have a "disable improved formatting" button instead. I definitely feel that by default formatting should be on, not off, to encourage good formatting and better posts.

I really think the way to go is to emulate the Stack Exchange sites.


Paul Smith Thu 15 Nov 2012 12:23AM

Scott makes a really good point. One of the reasons I thought red carpet was a good choice initially was there's this:


Which is a library that fancifies your text area (wysiwyg) and comes with out of the box markdown preview support.

Would a WYSIWYG with preview and a help button be enough to solve most of the issues?


Benjamin Knight Thu 15 Nov 2012 12:38AM

Awesome ideas!

I'm suggesting making markdown opt-in as a short-term quick fix - ideally it would be awesome to have a basic formatting GUI like Gmail, so ability to format text isn't limited to the tech-literate.


Jon Lemmon Thu 15 Nov 2012 10:10AM

Indeed, Scotty and Paul bring up good points.

However, I do also hear what Ben is saying that maybe we should make it opt-in for now until an elegant, dummy-proof solution is implemented.

The problem is that we've got a lot of non-tech-literate people who are starting to use Loomio and get really confused when their comments look like this for some odd reason. And it could take a while before we craft a really nice solution that is opt-out worthy. It would need to be uber clear. The thing is that the majority of stackoverflow users are programmers, whereas we have people using Loomio who are the type that get apprehensive just about using a computer to check their email.


Jon Lemmon Thu 15 Nov 2012 10:12AM

I also think if we had the ability to edit comments it'd could make it less necessary to make it opt-in...


Richard D. Bartlett Fri 16 Nov 2012 1:27AM

I agree with everything!

Right now it's fair to say it is doing more harm than good, so I'd switch over to opt-in, and just put the option on your settings page, unless someone can think of a really unobtrusive way to display it on the various text input forms.


Jon Lemmon Fri 16 Nov 2012 1:44AM

I think a check-box next to "Post comment" might not be unobtrusive as long as it had a link and/or tooltip explaining in more detail. It would also help to educate users (e.g. "ooh, i want improved formatting! what's this?"). And it would also be a bit of a nag to us to think of a better way to do it long-term.

My gut tells me it would be weird putting it in the user's setting page (from a feature design perspective).


Richard D. Bartlett Fri 16 Nov 2012 4:41AM

Maybe you're right.

Like a checkbox labeled "Enable markdown" with a tooltip that says "Loomio uses Github flavoured Markdown to add formatting to your comments and proposals. Here's a quick introduction to writing Markdown."


Scott Lemmon Mon 19 Nov 2012 1:00AM

This all sounds good and reasonable. Jon makes a really good point out the user-base being quite a bit broader than just the tech literate. One thing is, could there be a way that we could have markdown be default for those of us that use it a lot?

Is the thought that this "Enable Markdown" checkbox would reset back to unchecked every time you post, or that it would keep it's state between posts and sessions?

I definitely vote for the latter, unless there is a good reason that it should reset back to unchecked.


Jon Lemmon Mon 19 Nov 2012 1:28AM

Yeah nah, it would remember what your preference was. Probably a boolean like user.prefers_markdown.

Each comment will then also need a comment.use_markdown boolean (same goes for discussion description).

@Rich - yeah I think not using the phrase markdown in the text might be better: "Enable improved comment formatting".


Jon Lemmon Mon 19 Nov 2012 2:16AM

Made a trello card here: https://trello.com/c/ryW0DsJ9


Richard D. Bartlett Tue 4 Dec 2012 7:40PM

Here's a quick mockup of what this might look like.


Matthew Bartlett Tue 4 Dec 2012 8:33PM

@richardd.bartlett — that link gives me a 404 (though it worked 10 mins ago). My comment on the mockup:

Too annoying to be presented with that option every single time one makes a comment.

I think it should be in loomio.org/settings/ — technically advanced users will look at their settings page.


Richard D. Bartlett Tue 4 Dec 2012 8:34PM


Matthew Bartlett Tue 4 Dec 2012 8:45PM

@richardd.bartlett — 'Sorry. You're not authorized to view this page. Try logging in below or clearing your cookies.' How does one get a login?


Richard D. Bartlett Tue 4 Dec 2012 8:56PM

Soz still learning balsamiq permissions. I think it is public now. Not the best ux :(


Aaron Thornton Wed 5 Dec 2012 8:31AM

@richardd.bartlett I like your idea of presenting it like the privacy icon where you can set it in the settings page but you can also toggle it on/off by clicking the icon.


mix irving Mon 7 Jan 2013 10:16AM

i'm having a go at implementing the dumb version of this.
just drilling in to try and find out how you've implemented markdown...

rich your balsamiq ain't public or is gone?


mix irving Mon 7 Jan 2013 12:11PM

ok getting there.

  • with the db migrations, shall I assume the default (as set in db migration file) for comments and discussions is :uses_markdown, :boolean, default = true ?
    (to preserve existing markdown use)
    nb - in future, forms will have a tickbox whose default position is set by the @user.wants_markdown boolean

  • i note in searches that motions use markdown too... presume implement here too

aside - noticed that when you click edit discussion then hit 'cancel', you get an ugly view : http://i.imgur.com/979Cp.png
repeating this sequence cycles the help message away again


Richard D. Bartlett Mon 7 Jan 2013 10:56PM

@johnirving this link should work. Note the comments on that thread for suggestions of how to improve my mockup. Feel free to edit :)

As a general process thing, I think we want to maintain the 'Features' group as a place for discussing mockups and behaviour. Once the mockups are approved more-or-less then any technical 'behind-the-scenes' questions are probably better dealt with elsewhere, e.g. in the 'Code' group. The intention is to keep this group as accessible as possible, to encourage non-developers to participate in feature design.

Re: aside = that's a known bug


Jon Lemmon Tue 8 Jan 2013 2:39AM

@johnirving that all sounds pretty good. I think we'll need to be careful about the way the user preferences for markdown are implemented on the context panel.

E.g.: if someone doesn't tick "use improved formatting" for the context (so user.wants_markdown == false), and then someone else goes to edit the context who has user.wants_markdown == true, then the markdown box will be unchecked. However, when they submit the edit we don't want the change to edit their user.wants_markdown preference to false. You see what I'm getting at?

@richarddbartlett hmm... I wonder about that process. It means that every feature will have two separate discussions. Could it not just be distinct phases where the first phase is accessible, and the second one isn't? I think eventually what you're saying will make total sense, but I wonder if it's a bit premature to implement it now.


Richard D. Bartlett Tue 8 Jan 2013 2:43AM

@jonlemmon fair enough; let's try to keep the phases distinct though eh? i.e. try to keep techno speak out of the equation until after the mockup is agreed. I'll stop cluttering up this thread now because it's getting pretty inaccessible :P


Jon Lemmon Tue 8 Jan 2013 3:07AM

@johnirving a few of us had a discussion about how to design this. let me know when you have a minute to discuss on skype.


Jon Lemmon Tue 8 Jan 2013 3:07AM

by design i mean like "which button goes where".


Josef Davies-Coates Tue 9 Jul 2013 4:13AM

this makes sense, but I guess has been done now with the little A in the right hand corning below the comment box? Or is that still turned on by default? (I can't remember if it was on or off when I first signed up).

Makes me think of something else though... how to archive or close a discussion? which is related to https://www.loomio.org/discussions/1106


Richard D. Bartlett Tue 9 Jul 2013 4:29AM

@josefdaviescoates unless there's something funny going on, Markdown should be off by default for new users.

Personally, I'd like to move beyond Markdown relatively soon as part of an overall upgrade of the comment box: easy formatting, drag-and-drop images, preview-before-post, attachments, link preview, etc.

I reckon this is a RoR gem waiting to happen :)


Rob Guthrie Tue 9 Jul 2013 5:55AM

Richard how would you feel about a editor like the following but with dnd image/file support?



Josef Davies-Coates Tue 9 Jul 2013 7:54AM

having some formatting buttons makes sense to me @robertguthrie

I'm assuming dnd image/file support means drag and drop image/file? Personally I tend to have app windows maximised and taking up the whole screen and so have never really made use of that where it exists (don't find it speeds up my work at all), but I guess others like it.

I don't like the second editor in the example you link to - don't like what it does to links and can't work out how the 'also' in the last sentence is italic!? :)