Hey IH Rails-ers!
I'm currently working on DinoSaaS - I'm building open-source MVP's in Rails along with step-by-step tutorials.
I wrote this 6-step tutorial on how to add rich text to your Rails app.
I'd looked into open-source rich text editors in the past, and this was far easier than I expected it to be:
permit
rich text field as a param in controllerrich_text_area
to model formshow
viewimage_processing
gem to be able to process images.Should take <10 minutes from start to finish.
Let me know what you think of the linked tutorial and if you have any ideas for what you'd like to see next!
The tricky part starts when you want to use ActiveStorage in production - gotta connect AWS S3 ;)
I will not recommend Trix if you care about SEO.
That's interesting; why do you say that? Is it Trix in general or all Rich Text?
For my use case, I was only using it for an internal bug tracking app where SEO would not be a concern.
No p tag. Trix uses div for paragraph
Images are inside figure instead of img tag
No support for tables.
H2 and below not supported out of the box?
Very good point about actually...
Let's say: for all non-SEO-sensitive cases, Trix is the go-to Rails approach :)
This comment was deleted 3 years ago.