New Discussion

Notifications

You’re not receiving notifications from this thread.

Trix editor is not displaying properly in Rails 6

2
Rails

Hello - I have installed Action Text in my Rails 6 app and made corresponding changes to my blog / controller, form to have rich_text_area show. Problem is that despite requiring actiontext in my application.scss - the Trix toolbar is not rendering properly. As in it is a long bar. Have now tried multiple combinations of requiring actiontext - but nothing seems to work.

In application.js :
require("@rails/activestorage").start(); is giving an error - Could not find a declaration file for module '@rails/activestorage'. .../node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js' implicitly has an 'any' type.
Try `npm install @types/rails
_activestorageif it exists or add a new declaration (.d.ts) file containingdeclare module '@rails/activestorage';`ts(7016).
Similarly, require("trix"); and require("@rails/actiontext"); are giving similar errors. What should I do to make this run properly. Any help will be greatly appreciated.
Thank you!

Try upgrading your @rails/webpacker package to the latest version, v5.2.1.

Thank you Drew for your response. I did update webpacker, but the error persists.

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.