Markdown Tutorial: How to Add Markdown to Rails App Using Redcarpet and Coderay Gems?
You may have seen many blogs having markdown support. You can add links, images, videos, and gifs to any article having markdown support. Thinking about content without worrying about the blog’s presentation makes it easy for bloggers to make great content. In this guide, we will implement a blog app to write articles with markdown support. Active Storage is used in Rails to add support for uploading media (images, videos, and gifs) present in your system that we can add in the article. For now, you can add images, videos, or gifs by using their URL (if they are already present on the web).
Tutorial Takeaways
Exploring Redcarpet and Coderay Gems
Adding Markdown to Rails App using gems
Github Repository
So, now we are clear about what this Markdown Tutorial with Redcarpet and Coderay gems will provide us. Let’s get started on its implementation without further ado and learn how to make a blog app with markdown support.
Initial Setup
Use the below command to create a new Rails app
rails new redcarpet-gem-example
Install Redcarpet and Coderay Gems
Generate Articles Scaffold
Update Routes
Logic to Add Markdown
Render Markdown in HTML
User Interface
This article was about Adding markdown to rails app if you want to read in detail with codes you can always refer to the link mentioned above













