Action Text is a new cool feature in Rails 6.0, which helps to build a rich text editor (WYSIWYG editor) easily in Rails application. It includes the Trix editor that handles everything from formatted text to links or embedded images. Attachments as images are automatically stored using Active Storage and associated with the included RichText model.
Trix is a rich text editor for everyday writing. Compose beautifully formatted text in your web application. Trix is an editor for writing messages, comments, articles, and lists—the simple documents most web apps are made of. It features a sophisticated document model, support for embedded attachments, and outputs terse and consistent HTML.
- Create a new Rails 6 application
- Create a Post model with 2 columns are: title and content
- Install Action Text
- Using Action Text to edit the content of Post
Detail on my blog: https://luanotes.com/blogs/using-action-text-in-rails-6