orf/simple

New features

Opened this issue · 6 comments

orf commented

Image uploads
Little paperclip on the edit page where you can upload images and have the resulting URL copied into the clipboard.

History
Some form of post version control?

Instant preview
Maybe split the editing page into two halves, one with the text box and one with a live preview using JavaScript to render it, or if not then render server side?

Image uploads
Good idea. There may also be a way to upload and share any type of document.
A dedicated admin page should be included, at least to delete out-of-date material.

History
The version control depends on either installed software or compilation of dedicated code within python modules. Not every host has the ability to install one of these, so it will split the user base. Note: if someone knows how to use a Git or Mercurial repository with plain Python code (and of course without calling external software), feel free to show me.

Instant preview
A good working example : http://www.showdown.im/ .

there is a javascript library for Markdown. Stack Overflow uses it. I can't remember, but I'll look int... Holy Moly, that showdown example looks awesome!!

;)

Challenge accepted!! As soon as I get to it, I'll write a feature proposition and we can discuss the specifics of how it should look.

initial thoughts:

  1. side-by-side markdown preview
    * pro: 100% clear markdown
    * cons: needs a certain amount screen real estate (I have a 12 inch laptop, so I'm concerned about that). We add another JS dependency...
  2. per-line/per-block markdown preview.
    * pro: does not need more screen real estate than the standard editor.
    * con: hard to implement (?), not quite as clear with the syntax stuff.
  3. Togglable in-place preview.
    * pros: doesnt need more screen space, could easily be implemented with existing server-side md-libs and ajax.
    * cons: not quite as slick.
orf commented

The real time markdown preview would be nice, I think that we could detect the screen resolution perhaps and if its too small for #1 then perhaps we can make it do #3 instead?

re: screen size detection

sounds like a great idea. the only thing I could see as a "problem" is that we would introduce possible discrepancies between the javascript version and the final rendered version. Also we should probably check how large the javascript markdown library is before including it.

orf commented

Ok, so I have been playing with live previews using Showdown and it looks quite good. The screen is split into two halves (each one ~6 columns wide), the one to the left is the textarea you type and the one on the left shows the converted markdown preview.

There are a few issues though which I need some advice on:

  • Simple uses a python library to parse Markdown. This supports a syntax highlighting extension which I find quite useful: you can wrap code between two ~~~~ lines and it will be syntax highlighted. Showdown does not support this: either we disable this custom extension or use some form of server-side rendering (which would incur a feedback delay).
  • Images appear very big and including lots of them in a post may mean that the preview is substantially longer than the markdown post so you can't see any feedback without scrolling down the page. Would disabling images be a good idea?

To be honest I am not convinced live previews are a good idea - it looks a bit squashed on my 17-inch screen and the issues above could be hard to fix

I'm trying to fix a few minor gripes with EpicEditor and as soon as I manage, i'll make a branch of Simple with that as the editor. it looks really neat.