0

After installing Tailwind rich_text_area isn't showing correctly in forms. Exist a conflict between Rails6 ActionText and tailwind webpacker installation

There's a trick to fix this error? Thanks in advance!

Expected behavior form.rich_text_area showing a text area w/ TRIX editor in view.html.erb

Actual behavior Appearing a simple blank square in the area

Configuration

  • Debian 9
  • Apache-MariaDB
  • Phusion Passenger 6.0.4
  • rvm: 1.29.9
  • Ruby: 2.6.4p104
  • Rails: 6.0.0
  • Node: v8.16.2
  • Webpacker: 4.0.7
  • Yarn: 1.19.0
  • Tailwind CSS v1.1
  • Vue.js 2.9.6

Following the official guide: https://edgeguides.rubyonrails.org/action_text_overview.html

model.rb
has_rich_text :content
new/edit form
form.rich_text_area :content
view.html.erb
@message.content
coopeu
  • 83
  • 5
  • TEST DONE: Presently, installing Tailwind in a fresh RAILS 6.0.1 installation you lost the ActiveStorage rich_text_area functionality. Surely the reason is in setting TRIX.js – coopeu Nov 12 '19 at 12:49
  • Corinn Pope is proving this solution: https://corinnpope.com/development/2020/01/23/rails-6-action-text-tailwind.html but it's also not working for me. resulting error: undefined method `body' for # – coopeu Apr 23 '20 at 13:27
  • woot woot! thanks for that link – greenie-beans Aug 13 '20 at 01:40

0 Answers0