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

Markdown Support? #66

Closed
patrickcate opened this issue Apr 18, 2015 · 6 comments
Closed

Markdown Support? #66

patrickcate opened this issue Apr 18, 2015 · 6 comments

Comments

@patrickcate
Copy link

Any chance of markdown support being added?

@neilj
Copy link
Member

neilj commented Apr 18, 2015

Not really. (I'm not even sure what this would look like; this is a WYSIWYG editor, so where does markdown fit in?)

@craigmarvelley
Copy link
Contributor

I'm not sure if this is what @patrickcate meant, but something I need to add to our editor (which decorates Squire) is the ability to transform certain fragments of text into HTML. So if the user types *(space) a list is created. I don't even want full markdown support, just a few things like lists, headings etc. If that's something you think'll fit well with Squire, perhaps as an optional feature, I'm happy to do a PR for it.

@patrickcate
Copy link
Author

Yes, @craigmarvelley that is essentially what I was asking about. Instead of inserting HTML formatting, the toolbar would insert Markdown formatting and then give a live preview. Some akin to http://alecgorge.github.io/MarkdownEditor/ but instead offer a live in place preview. The full markdown syntax wouldn't need to be supported, just the markdown the toolbar actually has buttons to insert.

@neilj
Copy link
Member

neilj commented Apr 21, 2015

Err, I think you're asking for two different things. If I'm understanding right, @craigmarvelley is suggesting adding auto-detection of intended formatting from people typing plain-text equivalents, and live-changing the text into the equivalent HTML form. @patrickcate seems to be asking for a plain text editor with a toolbar that inserts markdown, but then underneath formats the text somewhat according to the Markdown entered.

The former is possible, although can be quite annoying when you really do want what you just typed. It would be nice to add perhaps as an optional plugin? If you can work out what events you need to trigger on, we can see if there are appropriate hooks (or add them) to do this. It's quite complicated to get right though!

The latter doesn't seem to fit with Squire at all; it's an entirely different type of editor, and you couldn't really build it on top of Squire..

@leeoniya
Copy link

to avoid a lengthy re-hashing [1], [2]. you can play with a bi-directional demo i made with reMarked and redactor a while back: [3]

you can go full out and use either https://github.com/jonschlinkert/remarkable or https://github.com/markdown-it/markdown-it to implement restricted html <> markdown mapping. and use a codemirror + markdown renderer combo (or similar) to "do it right", but it's likely a lot of non-trivial work [4].

[1] html5cat/redactor-js#2
[2] slab/quill#74
[3] http://leeoniya.github.io/redactor-js
[4] jonschlinkert/remarkable#128 (comment)

@neilj
Copy link
Member

neilj commented Apr 25, 2015

Thanks for that. I think this request is really outside the scope of Squire. A good Markdown editor would be an entirely different product, and probably require quite a different code base.

@neilj neilj closed this as completed Apr 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants