Questions tagged [actiontext]

148 questions
18
votes
3 answers

Add Buttons to Rails ActionText toolbar

What is the best way to configure ActionText to add buttons to the toolbar. For example, an h2 and h3 button?
Will
  • 4,498
  • 2
  • 38
  • 65
13
votes
2 answers

Is there any way to disable image/attachment part for action text in Rails 6?

Do we have a way to disable attachment for action text? something like below has_rich_text :content, attachment: false So that, We can remove active_storage_blobs, active_storage_attachments tables from db. Only having action_text_rich_texts table…
12
votes
3 answers

Rails 6.0 action text couldn't find file 'trix/dist/trix' with type 'text/css'

So I am using rails 6.0.1 and trying to use Action text. So I run the command rails action_text:install and add the gem image_processing and finally run rails db:migrate When I launch my app I got this error message: Sprockets::FileNotFound in…
chris
  • 341
  • 2
  • 6
12
votes
3 answers

Rails 6 ActionText isn't working on Heroku (undefined method 'rich_text_area_tag')

I am using ActionText to edit a paragraph and it works perfectly locally but when I deploy it to Heroku the page which has the form with rich_text_area it throws an error saying undefined method rich_text_area_tag even though I followed the rails…
Grofen
  • 153
  • 8
11
votes
3 answers

How to test ActionText using RSpec?

I am trying to write an RSpec system test that involves filling out an ActionText / Trix field on a page. It seems as though ActionText::SystemTestHelper as defined here is available to help with this task but so far I have not had any success in…
mdh
  • 418
  • 5
  • 16
10
votes
3 answers

How to embed an iframe with ActionText/Trix on Ruby on Rails?

I can't find a way to implement the functionality of embeding youtube/vimeo video is actiontext/trix. This is what I want to achieve: GIF source: https://github.com/basecamp/trix/issues/206#issuecomment-198479999 I've looked at all the similar…
Yshmarov
  • 3,450
  • 1
  • 22
  • 41
10
votes
3 answers

Converting back to plain text when using ActionText

First let me say that I love what Rails 6 has to offer in ActionText. Unfortunately when I declare it for an attribute in something like a post model: class Post < ApplicationRecord has_rich_text :body end I can't access the body's text anymore.…
Carl Edwards
  • 13,826
  • 11
  • 57
  • 119
9
votes
2 answers

Using ActionText without webpack

I try to implement ActionTest with old way asset pipeline (without Webpack) on rails 6 Almost all is good, except loading of @rails/actiontext in my application.js I've //= require trix //= require @rails/actiontext The riche editor appear, I can…
Olivier
  • 493
  • 2
  • 6
  • 16
8
votes
8 answers

Upgrading to ActionText - editor not working/appearing properly

I'm trying to implement ActionText on my app that's been upgraded to Rails 6.0.1. I ran rails action_text:install and migrated, then added has_rich_text :content to my comment model. Then in the form I've switched f.text_area :content to…
DavidM
  • 173
  • 1
  • 9
8
votes
2 answers

Rails Action Text for existing text field

I am upgrading one of my news app to Rails 6.0.0. While working around I got a problem using Rich Text. My app is pointing the rich text body field instead of the my existing table body field. Is it possible to use the existing table text field for…
Santosh Aryal
  • 1,276
  • 1
  • 18
  • 41
7
votes
2 answers

DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper

I'm trying to understand the deprecation warning: DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper. Being able to do this is deprecated. Autoloading during initialization is going to…
karns
  • 5,391
  • 8
  • 35
  • 57
7
votes
0 answers

Rails ActionText: Disable Direct Upload

Is there a way to disable direct upload of images and attachments from the ActionText/Trix Editor and replace it with a POST request to the rails backend to do the upload to S3? I'm trying to do this to audit any user upload actions from Rails…
konyak
  • 10,818
  • 4
  • 59
  • 65
5
votes
2 answers

Rails 6 - Action Text & API

I'm creating a Rails 6.0.0 App and it has the following modules: Web - Forms / Cruds Api There's a CRUD where I use Action Text. The form is working OK, I successfully implemented the Action Text artifacts. Moving forward, I've created a JSON API…
Luis de Haro
  • 711
  • 1
  • 7
  • 28
4
votes
1 answer

ActionText stripping out iframe tag despite whitelisting them in Rails 6 application

I'm using ActionText inside of a rails 6 application. I added custom attachments to Trix so that users can embed Vimeo and YouTube videos. The videos are shown as expected when loaded within Trix. However, when showing them on a page using something…
ilrock
  • 95
  • 4
1
2 3
9 10