Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the Markdown editor with a WYSIWYG #151

Closed
mandii opened this issue Aug 22, 2014 · 34 comments
Closed

Replace the Markdown editor with a WYSIWYG #151

mandii opened this issue Aug 22, 2014 · 34 comments
Labels
enhancement explains that the issue is to improve upon one of our existing features
Milestone

Comments

@mandii
Copy link

mandii commented Aug 22, 2014

A text editor that shows formatting is needed!

Viewing and editing text in markdown is a total accessibility issue for new users that may or may not be familiar with it. Even after learning how it works, editing text is with it is still unnecessarily difficult. With image heavy text like the curriculum I am creating, switching between the preview and edit mode is difficult and doesn't allow me to see how the document will turn out. It requires endless back and forth to make small edits. Why complicate something that we want to make easy for anyone to use?

@btbonval
Copy link
Member

"Why complicate something..." The current implementation is simple, while the user interface is complex. It is a complex implementation to program a simple user interface. Given a small software development staff, complex implementations tend to be put on hold in favor of what can be done in short order.

That aside, it could be possible to realize this with a two column view showing both editor window and preview window side-by-side. Sort of like this:
http://www.markdownpad.com/

However that two column interface would never work for mobile devices, in which case the back and forth method is still the only thing I can think of.

The only alternative I can dream up is a full WYSIWYG editor with no different between preview and editing modes. We're not so far from that with the buttons that currently exist to inject the markdown (the user really doesn't need to know any markdown at present). However, the buttons would have to operate in a preview-mode fashion. I'm unaware of any open source markdown editors that presently do this. It'd be a large coding endeavor. If anyone finds an open source project that operates a full editor in preview mode and saves markdown in the backend, that'd be super nice.

@ebarry
Copy link
Member

ebarry commented Aug 26, 2014

Interesting idea though. What would be needed to make this happen @btbonval ? Do we need to go to fundraising team and articulate this need to make Publiclab.org more useable, @jywarren ?

@btbonval
Copy link
Member

@ebarry two column layout should be fairly easy to implement, with gotchas on mobile. The ability to render markdown as it is being edited? I don't have any good ideas for that. I can't remember the last time I saw that sort of capability outside a dedicated document editor like MS Word, LibreOffice Writer, or various rich text editors. I've never seen it done on the web as I can recall.

@mathewlippincott
Copy link

Side by side editing in Markdown Pad looks pretty slick-- it has formatting buttons and a live preview. pretty nice. It also helps someone learn to use markdown-- so maybe when they use the mobile interface they'll remember a few things.
screen shot 2014-08-26 at 9 55 02 am

@mandii
Copy link
Author

mandii commented Aug 26, 2014

This would be so helpful! Being able to see the changes as you edit and
how it will turn out would cut down on so much back and forth.

On Tue, Aug 26, 2014 at 9:56 AM, mathew lippincott <notifications@github.com

wrote:

Side by side editing in Markdown Pad looks pretty slick-- it has
formatting buttons and a live preview. pretty nice. It also helps someone
learn to use markdown-- so maybe when they use the mobile interface they'll
remember a few things.
[image: screen shot 2014-08-26 at 9 55 02 am]
https://cloud.githubusercontent.com/assets/1203280/4048265/be473ae8-2d41-11e4-8c20-2a2ed4e0e17d.png


Reply to this email directly or view it on GitHub
#151 (comment).

@btbonval
Copy link
Member

VueJS is a nice side-by-side markdown editor that should be easy to incorporate.
http://vuejs.org/examples/

MIT Licensed, so we don't have to worry about that.
https://github.com/yyx990803/vue/blob/master/LICENSE

We could get into weird issues here because we have a front-end markdown editor for preview mode (marked.js) which is separate from the markdown to HTML rendering gem used by Ruby (rdiscount). That leads to #139

It might be better to toss out the Ruby markdown renderer and perform all markdown rendering client-side, which would take care of #139.

Based on the example of VueJS, it is pretty easy to add or remove the editor:
http://jsfiddle.net/yyx990803/u6UbY/light/
(comment out <textarea v-model="input"></textarea> and the editor goes away, leaving only the rendered markdown)

@btbonval
Copy link
Member

@jywarren Any opinions regarding the removal of RDiscount and replacing the editor you've worked so hard on thus far with Vue?

We might need to readd functions like embedding YouTube and such. I'm also unsure how well the Vue editor will support arbitrary HTML, which might be a good thing given the IFRAME discussion in other threads ;)

@mathewlippincott
Copy link

I want to re-open this discussion in light of Mozilla's new Open Science forum, which has a great system implemented for the "dual display"
screen shot 2014-10-08 at 10 55 34 am

@ebarry
Copy link
Member

ebarry commented Oct 8, 2014

love the look of this. Can we has it?

@lizbarry http://twitter.com/lizbarry

On Wed, Oct 8, 2014 at 1:57 PM, mathew lippincott notifications@github.com
wrote:

I want to re-open this discussion in light of Mozilla's new Open Science
forum, which has a great system implemented for the "dual display"
[image: screen shot 2014-10-08 at 10 55 34 am]
https://cloud.githubusercontent.com/assets/1203280/4564107/7da81f44-4f14-11e4-8639-c2f048ce8e35.png


Reply to this email directly or view it on GitHub
#151 (comment).

@btbonval
Copy link
Member

btbonval commented Oct 8, 2014

I'm not sure that two column view is any different than markdownpad or vuejs. @mathewlippincott Can you elaborate on where to find source code for it and why it might be an improvement over the previous recommendations in this thread?

@mathewlippincott
Copy link

I don't know where the code is. their bug reporting goes to a codeless repository:
https://github.com/mozillascience/site

@mathewlippincott
Copy link

http://forum.mozillascience.org/ can't find a repo link or anything

@mathewlippincott
Copy link

asked on twitter

@ebarry
Copy link
Member

ebarry commented Jan 13, 2015

Hi @btbonval and @jywarren , a WYSIWYG editor seems like a major (yet basic) improvement for streamlining community contributions to PL research notes and the wiki knowledge base. There also seem to be clear next steps as described in this thread. Can you guys create an estimate of hours that it would take to do this so we can fundraise for it?

@btbonval
Copy link
Member

Minimal effort, so with testing and allowing for unknown unknowns, I'd guess 4 worker hours. That should be a bit of a worst case estimate.

There's an unaddressed question of whether or not to discard the Ruby-based markdown renderer and leave markdown rendering entirely client based. That is brought up in #139 , but for some reason none of the people in that ticket's conversation talk here and vice versa. The two are highly related.

@btbonval
Copy link
Member

PS you going to use bounty source to put a value on this ticket? I highly recommend it.

@ebarry
Copy link
Member

ebarry commented Jan 13, 2015

@btbonval i am only familiar with setting up contracts with individuals. Does Public Lab have bounty source set up?

@btbonval
Copy link
Member

@ebarry Bountysource integrates into GitHub. This ticket will be marked with a dollar amount and have a link to BountySource (and BountySource will link to this ticket).

They basically indexed github:
https://www.bountysource.com/search?query=publiclab

I thought @jywarren set up an account to post some bounties on bountysource, but if he did, I don't think he posted any for PublicLab. Once you have an account, here's the page to add a bounty to this ticket:
https://www.bountysource.com/issues/3997039-markdown-inaccessible-to-new-contributer

Here's a page to manage how BountySource modifies the tickets once bounties are assigned:
https://www.bountysource.com/tools

@mathewlippincott
Copy link

Is there any way we can prioritize this? I'm editing long, image-heavy wiki pages and it is driving me completely nuts to

  1. find my place in edit mode after previewing and
  2. that I can't tell which image is which in edit mode.

This is a high priority feature - not having a live preview or WYSIWYG is inhibiting the usability of our site for both beginners and expert users, limiting community growth, and skewing our contributor demographics.

@jywarren
Copy link
Member

jywarren commented Feb 5, 2015

Liz has brought this up in person a few times recently; I wasn't aware it
was in demand for both power-users and newcomers. If we'd like to make it a
staff priority, let's talk about it on the staff call monday? Otherwise,
could you open a discussion on the organizers list so we can hear from
different people about it? Thanks.

On Thu, Feb 5, 2015 at 3:10 PM, mathew lippincott notifications@github.com
wrote:

Is there any way we can prioritize this? I'm editing long, image-heavy
wiki pages and it is driving me completely nuts to

  1. find my place in edit mode after previewing and
  2. that I can't tell which image is which in edit mode.

This is a high priority feature - not having a live preview or WYSIWYG is
inhibiting the usability of our site for both beginners and expert users,
limiting community growth, and skewing our contributor demographics.


Reply to this email directly or view it on GitHub
#151 (comment).

@mathewlippincott
Copy link

@btbonval
Copy link
Member

btbonval commented Feb 7, 2015

Hallo looks like a decent solution that has a toolbar and is two-up. Definitely trumps VueJS.

I seem to recall that @jywarren added some custom markdown components. We should take a look at the Hallo code to see if it would be easy to add in a few extra options, although I'd personally rather keep with an upstream distribution rather than trying to keep a fork up to date.

Softish Pen doesn't have an obvious UI. It's there, but you have to highlight before it's apparent. I do like the button that toggles markdown markings on/off.

I'm not sure how the two-up choices differ from VueJS and each other, but they all seem inferior to Hallo due to the lack of a toolbar.

@btbonval
Copy link
Member

btbonval commented Feb 7, 2015

Hallo runs on jQuery UI, a pretty standard JS package. It isn't specifically for editing Markdown, instead it is for editing the DOM. So the example that @mathewlippincott found of Markdown actually renders the DOM element as HTML.
http://hallojs.org/js/markdown/editor.js

A separate library converts the HTML to Markdown, and it appears to be this one: https://github.com/domchristie/to-markdown

More info about the discussion of that example is here:
bergie/hallo#192

Basically the example is there and isn't documented or referenced outside of the example's readable (but uncommented) source code.

@btbonval
Copy link
Member

btbonval commented Feb 7, 2015

We could use the to-markdown function with any WYSIWYG HTML editor in the same way as Hallo, but Hallo happens to provide a nice example of how to do it.

@mathewlippincott
Copy link

I'm glad it looks pretty doable! I was impressed when I found it. interesting that they do exaclty what you expected we'd have to do-- convert to HTML and back again.

@btbonval
Copy link
Member

btbonval commented Feb 7, 2015

Honestly this is exactly why I said it's hard to find a WYSIWYG Markdown editor. They all kind of do this.

This does raise the question of whether we even care to perform the HTML to Markdown conversion step. @jywarren has some good arguments in favor of keeping Markdown for simplicity (and some folks like raw Markdown). I think Markdown limits the structure that can be created in HTML, which I think is good.

Even if we went straight HTML, keeping it simple might suggest performing a HTML > Markdown > HTML conversion, but then why not just stop the process at HTML > Markdown as noted above?

I'm not seeing any particular reasons to move to HTML. Maybe we only discussed that in the email thread. Divergent discussions :(

@jywarren
Copy link
Member

jywarren commented Feb 7, 2015

+1 keeping markdown if we can't think of a reason not to; the existence of
an HTML to Markdown converter makes this an easier decision!

On Fri, Feb 6, 2015 at 8:30 PM, Bryan Bonvallet notifications@github.com
wrote:

Honestly this is exactly why I said it's hard to find a WYSIWYG Markdown
editor. They all kind of do this.

This does raise the question of whether we even care to perform the HTML
to Markdown conversion step. @jywarren https://github.com/jywarren has
some good arguments in favor of keeping Markdown for simplicity (and some
folks like raw Markdown). I think Markdown limits the structure that can be
created in HTML, which I think is good.

Even if we went straight HTML, keeping it simple might suggest performing
a HTML > Markdown > HTML conversion, but then why not just stop the process
at HTML > Markdown as noted above?

I'm not seeing any particular reasons to move to HTML. Maybe we only
discussed that in the email thread. Divergent discussions :(


Reply to this email directly or view it on GitHub
#151 (comment).

@mathewlippincott
Copy link

@manleyjster suggestions from the Organizers e-mail thread:

Hallo.js - WYSIWYG Markdown editor
markable.in - Not open-source, but maybe the kind of hybrid Markdown editor we might be looking for?
socrates.io - A really nice looking hybrid Markdown editor with live preview. And it's open source!

CKEditor - IMO the state-of-the-art for HTML text editors
Quill - another HTML text editor

A list of more Markdown web editors.

@jywarren jywarren changed the title Markdown inaccessible to new contributer Alternatives/improvements to the Markdown editor Feb 18, 2015
@designviacode
Copy link

Hi, This has been listed under gsoc projects can this be taken.. I'm really interested in doing this.

@jywarren
Copy link
Member

Yes! I think were going to try for a 2-up markdown WYSIWYG editor as
discussed above. Do you have a copy of the plots2 codebase installed?
On Feb 19, 2015 3:07 PM, "Manpreet Singh" notifications@github.com wrote:

Hi, This has been listed under gsoc projects can this be taken.. I'm
really interested in doing this.


Reply to this email directly or view it on GitHub
#151 (comment).

@btbonval
Copy link
Member

Just to be clear there are no 2 up WYSIWYG editors for markdown. Either you
get WYSIWYG or 2 up.

I think the current preference is for WYSIWYG but not 2 up.

This assumes 2 up means raw and renders versions in a side by side preview,
I've never been sure. Anyway having a WYSIWYG means the content is rendered
as it is edited, so two panels don't add anything.
On Feb 19, 2015 3:18 PM, "Jeffrey Warren" notifications@github.com wrote:

Yes! I think were going to try for a 2-up markdown WYSIWYG editor as
discussed above. Do you have a copy of the plots2 codebase installed?
On Feb 19, 2015 3:07 PM, "Manpreet Singh" notifications@github.com
wrote:

Hi, This has been listed under gsoc projects can this be taken.. I'm
really interested in doing this.


Reply to this email directly or view it on GitHub
#151 (comment).


Reply to this email directly or view it on GitHub
#151 (comment).

@jywarren
Copy link
Member

Oops, indeed I misspoke!
On Feb 19, 2015 4:33 PM, "Bryan Bonvallet" notifications@github.com wrote:

Just to be clear there are no 2 up WYSIWYG editors for markdown. Either you
get WYSIWYG or 2 up.

I think the current preference is for WYSIWYG but not 2 up.

This assumes 2 up means raw and renders versions in a side by side preview,
I've never been sure. Anyway having a WYSIWYG means the content is rendered
as it is edited, so two panels don't add anything.
On Feb 19, 2015 3:18 PM, "Jeffrey Warren" notifications@github.com
wrote:

Yes! I think were going to try for a 2-up markdown WYSIWYG editor as
discussed above. Do you have a copy of the plots2 codebase installed?
On Feb 19, 2015 3:07 PM, "Manpreet Singh" notifications@github.com
wrote:

Hi, This has been listed under gsoc projects can this be taken.. I'm
really interested in doing this.


Reply to this email directly or view it on GitHub
<#151 (comment)
.


Reply to this email directly or view it on GitHub
#151 (comment).


Reply to this email directly or view it on GitHub
#151 (comment).

@btbonval btbonval changed the title Alternatives/improvements to the Markdown editor Replace the Markdown editor with a WYSIWYG Mar 9, 2015
@btbonval
Copy link
Member

btbonval commented Mar 9, 2015

replacing the editor with a wysiwyg would fix a number of issues related to previews and publishing, like #249, #158, and (as previously noted) #139.

@jywarren jywarren added the enhancement explains that the issue is to improve upon one of our existing features label Apr 1, 2015
@jywarren jywarren added this to the Rich Editor milestone Feb 23, 2016
@jywarren
Copy link
Member

Folding into Rich Editor project, thanks! https://github.com/publiclab/PublicLab.Editor/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement explains that the issue is to improve upon one of our existing features
Projects
None yet
Development

No branches or pull requests

6 participants