What problem does it solve?
AI coding agents often generate non-conventional, insecure Rails rich text implementations: they may skip critical XSS sanitization, misuse Active Storage for embedded attachments, index unsearchable raw HTML instead of plain text, or recommend less secure alternative editors without proper justification. This Skill ensures agents follow Rails 8 Action Text best practices for secure, maintainable rich text functionality.
Core Features & Use Cases
- Secure Trix Integration: Adds the default Rails Trix WYSIWYG editor to models via has_rich_text with out-of-the-box XSS protection.
- Embedded Attachment Handling: Automatically wires drag-and-drop image and file uploads to Active Storage with proper variant processing.
- Search-Ready Content: Provides patterns for indexing plain-text extracted from rich text, compatible with tools like pg_search.
- Use Case: For a Rails blog application, use this Skill to add a rich text editor for post bodies that safely handles embedded images, prevents XSS attacks, and lets users search post content without parsing raw HTML.
Quick Start
Use the actiontext-richtext skill to add a secure, Trix-powered rich text editor to your Rails Post model with embedded image support and plain-text search indexing.