cccs-web / core

CCCS' customized django web application
4 stars 11 forks source link

Replace django-pagedown editor with epic editor for better markdown admin edits #85

Open pwhipp opened 10 years ago

pwhipp commented 10 years ago

The epic editor is very cool, offering a nice full page edit capabililty with live preview.

The currently implemented django-pagedown uses stack overflow's editor which is robust but does not offer the full page edit capability and has problems with previewing tables and other popular markdown features.

pwhipp commented 10 years ago

I don't know how long this will take to do. The admin presentation needs manipulation. Probably no more than an hour or two but perhaps as many as four.

It would mean that we'd be using our own fork of django-pagedown (or maybe our own django-epicmd based on django-pagedown).

cccs-ip commented 10 years ago

Your comment on a #61 stated:

The Epic editor has a cool side by side full page, live preview mode and works better as a small single box where you can flip between the edit and preview mode.

I remain confused about the meaning of "full page" and how that relates to toggling on the preview mode. While I generally like the concept of 'live preview' (available already in our current editor), I sometimes find the side-by-side presentation style of many markdown editors to be distracting, as the formatting rarely lines up. I like the GitHub style 'write' and 'preview' interfaces much better--allowing you to check a formatting issue when needed by otherwise saving screen real estate.

It seems that epic editor offers the "best of both worlds", in a sense, and I would be happy to invest the hours needed to implement it. Thanks for being willing to attempt to tackle this challenge.

pwhipp commented 10 years ago

Have a play with it on http://epiceditor.com/. The full screen button appears on the bottom right of the pane when the mouse is moved over the pane. It has the 'write/preview' mode by default - click the eye icon to preview and the eye slash icon to go back to markdown. Use escape to exit full screen.

You are right about previews not lining up but that would be a 'holy grail' - short of dynamically resizing the source markdown font (which would look weird) or chopping the the markdown and output into blocks for approximate lineup (which would look weird) I can't see any way to do that.

An improvement in preview line up that could be made would be to include the cursor point in the preview automatically - still heuristic but centering it in the flow would work. That way you'd usually see what you are working on.

cccs-ip commented 10 years ago

thanks again. i had figured out the preview differences in epic editor post and noted that it offers 'the best of both words' in the sense of offering both the preview and the full page options.

the preview line-up / centering with cursor position would be cool; not entirely necessary at this point.

pwhipp commented 10 years ago

I've reviewed the code preparatory to forking and doing this. There are a number of problems - the mezzanine-markdown repo is in bitbucket and uses mercurial. It links to google apps project which links back to github.

It is still doable but sorting all this out will probably mean creating an entirely new 'mezzanine-markdown' app and cherry picking from the relevant repos or linking to the other github repos.

Looking like six to eight hours work so I suggest we drop this off the current list unless you feel it is worth eight hours now.

cccs-ip commented 10 years ago

Thanks, Paul. You're right - we have other priorities. I really like your current markdown implementation anyway. Epic editor might improve things a bit in terms of functionality, but at this point we have other more pressing concerns.

I will return home next week and hope to focus on finalizing the site and getting the document management system working. If you happen to run out of things to do before then and wish to start working on this issue, please feel free.

pwhipp commented 10 years ago

Well, it looks like I might have to fork the mezzanine-pagedown repo anyway in order to fix #84 which will bring us a step closer.