Skip to main content

How is the Trix editor on gorails.com "Parsed with Markdown"?

General • Asked by chrickso
497825ebbcb0e06c2451d3ff91d644b2
I was considering implementing on my website the ability for users to switch between a markdown editor or the trix editor but then I noticed on this gorails.com editor (which appears to be Trix) it says "parsed with markdown" below it and I'm wondering how this is possible and what I can do to enable my trix editor to parse markdown. It was my understanding that Trix translates what is typed clientside into HTML and the HTML-ized body is content is what is submitted via the form to the rails controller.

Is there some markdown parser customized into the Trix library or is the parser even running clientside or is the parser just run serverside of the HTML-ized body content before it is saved? I would really love any info on how this is done and how I can incorporate the same functionality.

Thanks in advance for any insight.

497825ebbcb0e06c2451d3ff91d644b2
~~~is this really parsed with markdown test~~~

1. Item 1
1. Item 2
1. Item 3
   1. Item 3a
   1. Item 3b
      1. Item 3b
         1. Item 3b


- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete ite

First Header | Second Header ------------ | ------------- Content from cell 1 | Content from cell 2 Content in the first column | Content in the second column

> guess not

Ce795239ba5dd2384fc2f88ffaff5451
That's actually leftover from when I moved away from SimpleMDE. I forgot to remove that. Unfortunately Trix isn't great for code samples so I think I'm going to be migrating back.

Luckily HTML is valid Markdown, but like you see above, you can't really have Markdown in HTML because the characters will be escaped.

497825ebbcb0e06c2451d3ff91d644b2

switching back to SimpleMDE or something else? SimpleMDE looks cool but not being updated at all since mid 2016 is worrisome


Ce795239ba5dd2384fc2f88ffaff5451

I'm not sure it's so worriesome. A markdown editor is super simple so unless there are a ton of bugs, there's not much maintenance that you would need.


497825ebbcb0e06c2451d3ff91d644b2

thanks for the info


497825ebbcb0e06c2451d3ff91d644b2

indentation test for simpleMDE:

This is the top level.
This should be indented (level 1)
indented more (level 2)
indented more (level 3)

  • Bullet Top Level
    • Bullet Level 2
      • Bullet Level 3
        • Bullet Level 4
          • Bullet Level 5

431433d7ba357ffa14161a68b3b573bc

what i really dont like on trix is that it seems to be impossible to style content in it like centering words etc.
In addition to that i really would love to embed social media in my posts like twitter feeds, spotify etc but that seems to be not possible aswell


Ce795239ba5dd2384fc2f88ffaff5451

Sebastian, you can always build custom buttons for Trix to add those features.


431433d7ba357ffa14161a68b3b573bc

uh ehm, okay didnt know that, is there a guide which shows how to achieve that? looks promising! thank you for that information!


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 18,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

More of a social being? We're also on Twitter and YouTube.