trix icon indicating copy to clipboard operation
trix copied to clipboard

Add markdown support or state that it will not be added

Open david-a-wheeler opened this issue 7 years ago • 39 comments

Trix doesn't support Markdown in and out, and while for many uses that's just fine, for my use-case that's a showstopper.

I'd like to see support for Markdown (specifically CommonMark) added to Trix, either directly or perhaps as some sort of plug-in. Support for Markdown was previously raised in https://github.com/basecamp/trix/issues/35 but closed without clear resolution. Similarly, there was a "roadmap"/ideas list in https://github.com/basecamp/trix/issues/31 , but that was closed without clearly noting if that's a desired capability.

If Markdown is expressly not going to be added to Trix (because the developers oppose it), I'd like that documented clearly. Otherwise I suspect this issue will keep resurfacing & wasting everyone's time.

Thanks so much for your time!!

david-a-wheeler avatar May 02 '19 15:05 david-a-wheeler

This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.

stale[bot] avatar Jul 31 '19 16:07 stale[bot]

Sorry for the bump (just doing it because of the stalebot), but we would also like to know the answer to this question!

jfly avatar Jul 31 '19 17:07 jfly

What does "support Markdown" mean, exactly? Automatically convert Markdown syntax to formatted text as you type?

javan avatar Jul 31 '19 18:07 javan

Just chiming in. In my own use case I would expect markdown to output HTML but not format as I type. That would be a bonus but not crucial. Maybe something like reddit does with a toggle between their "fancy pants" editor and their markdown editor?

Screen Shot 2019-08-04 at 10 20 43 PM

justalever avatar Aug 05 '19 03:08 justalever

We're looking for something that takes in markdown and produces markdown. We only convert to HTML at display time, and like this because it gives us some flexibility between content and display. We currently use (the now abandoned) https://simplemde.com/ for this.

jfly avatar Aug 05 '19 16:08 jfly

Hi there 👋

What does "support Markdown" mean, exactly? Automatically convert Markdown syntax to formatted text as you type?

Yes that is something I'd be really looking forward to. As of now the output of Trix is HTML-Markup or am I mistaken?

grekko avatar Aug 24 '19 06:08 grekko

Hello!

I'm also very interested in the possibility to edit docs in Markdown that will be then outputted in HTML (once it is saved as a draft or posted).

I would especially like to benefit of syntax highlighting in code samples.

brindu avatar Nov 05 '19 14:11 brindu

Just leaving a note to say that SimpleMDE appears to be abandoned, with its most current revision being 4 years ago, while the EasyMDE fork is being actively developed.

https://github.com/Ionaru/easy-markdown-editor

dark-panda avatar Dec 18 '19 18:12 dark-panda

For me, I'd like to have a Document to Markdown converter. So I could store Markdown text into my database and access that data from other systems or languages such as Java. I believe the data format in database should be some kind of standard and exchangeable format rather than Trix format.

kylechine avatar Jan 03 '20 23:01 kylechine

Our text is stored in Markdown format in our database. There's a nice spec for Markdown, specifically CommonMark. So while we'd like to use Trix, it's useless for our purposes without roundtrip support for Markdown. Many other sites use Markdown, including GitHub (which we're typing on right now!). And there are a lot of "likes" on this issue. In short: I think the desire to roundtrip with Markdown is a widespread desire. That may not convince you, but I'm hoping it will :-).

david-a-wheeler avatar Jan 04 '20 00:01 david-a-wheeler

Hey guys, I would like to start implementing markdown support in trix. Would a toggle between the normal editor and a markdown editor (à la reddit editor, as suggested by @justalever), be enough? I'm thinking that the serialized editor would still return HTML and would still take in HTML. Any thoughts?

maximedupre avatar Jan 26 '20 00:01 maximedupre

@maximedupre - I can't speak for the universe. However, we store data in Markdown (as do many others), so having a way to take & return Markdown would be what we'd want. That said, it doesn't need to be the default, just a way to configure it (possibly using some external library / plug-in).

david-a-wheeler avatar Jan 26 '20 05:01 david-a-wheeler

I also think storing markdown is the way to go, It's more portable. I guess the translation between markdown and Trix won't be a performance issue :thinking:

fgilio avatar Jan 26 '20 14:01 fgilio

I will have to parse markdown anyway, so might as well offer the possibility to pass in markdown as an initial value. I have no idea about what the performances will look like. I'll optimize later if needed.

maximedupre avatar Jan 26 '20 14:01 maximedupre

This pull requests adds basic markdown support: https://github.com/basecamp/trix/pull/737

maximedupre avatar Jan 29 '20 16:01 maximedupre

This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 28 '20 17:04 stale[bot]

PR #737 is still fairly active, I don't think it's appropriate to close this issue yet.

jfly avatar Apr 28 '20 19:04 jfly

This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.

stale[bot] avatar Jul 27 '20 19:07 stale[bot]

It still looks like there's semi-recent activity on #737, I don't think it's appropriate to close this issue without a firm statement from the maintainers.

jfly avatar Jul 27 '20 19:07 jfly

This should not be marked closed. There's a proposed fix, and no word from the maintainers on what will actually happen.

david-a-wheeler avatar Jul 27 '20 20:07 david-a-wheeler