Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Markdown preview in post editor #7

Closed
vickychijwani opened this issue Feb 16, 2015 · 2 comments
Closed

Markdown preview in post editor #7

vickychijwani opened this issue Feb 16, 2015 · 2 comments
Milestone

Comments

@vickychijwani
Copy link
Owner

This issue belongs to the create / edit post epic: #5.


If possible, we should use the exact same Markdown implementation that Ghost uses. Ghost uses Showdown.js, which we might want to use, but it's likely to be quite slow on large blog posts. I'll try the options below first.

There are a couple of possibilities for a native Markdown implementation here:

  1. anddown: Pros: fast (NDK), has support for fenced code blocks, pre-built libs available. Cons: generates raw HTML, which makes it harder to use a native TextView with Spannables.
  2. bypass: Pros: fast (NDK), partial fenced code block support, used and co-maintained for Android by Trello, produces native Spannables directly, which means it'll be even faster and easier on the eyes than anddown's output. Cons: gfm support is buggy.
  3. pegdown: Pros: supports fenced code blocks (among many other extensions). Cons: apparently does not work on Android and / or is slow.

At this point, anddown bypass seems like the best option overall.

@vickychijwani
Copy link
Owner Author

Switched from AndDown to Bypass in 092354e.

@vickychijwani
Copy link
Owner Author

vickychijwani commented Sep 1, 2016

Note for posterity: Quill switched to Showdown.js long ago and renders the output via a WebView for 100% compatibility with Ghost (footnotes, fenced code blocks, etc). It's a bit slow to render initially (~1 sec delay), but quite acceptable nonetheless.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant