Questions tagged [actiontext]

148 questions
2
votes
2 answers

How to Setup ActionText in Administrate (Rails 6.1)

I'm trying to set up Action Text inside an Administrate Dashboard. I've followed the installation steps on the Rails Guides Overview page. Then when trying to add the attribute to /app/dashboards/lesson_dashboard.rb, I get errors. When I try body:…
Brad West
  • 943
  • 7
  • 19
2
votes
0 answers

Value of ActionText body is always " "(empty string)

I am using Rails 6 API and React. I'm trying to build a Rich Text Editor with ActionText. When I send the RTE content from the Trix editor on the front end, it just doesn't set the ActionText body to the body I sent through with Axios. I am sure…
crodev
  • 1,323
  • 6
  • 22
  • 39
2
votes
3 answers

How to seed data with ActionText has_rich_text?

In my model, I have: class Listing < ApplicationRecord ... has_rich_text :description ... end In my seeds.rb: @listing = Listing.new( title: 'CODE VEIN', price: 59.99 * 100, description: …
zozotop
  • 61
  • 1
  • 7
2
votes
1 answer

Rails action_text no upload after switching to amazon active storage

When I attach image or other file in action_text (using trix editor), the image displays with a greyed out progress bar and no progress is made and the file is never uploaded. I get this in my log: Started POST "/rails/active_storage/direct_uploads"…
MDWPILOT
  • 71
  • 4
2
votes
2 answers

Rails: Trix editor showing image and image size when caption is not specified

I am working on a Rails 6 application with Ubuntu 18. I just installed ActionText for the Trix Editor (what you see is what you get), so that I can save text to the database which can be modified by an admin, however, when I add an image using the…
Promise Preston
  • 24,334
  • 12
  • 145
  • 143
2
votes
0 answers

Soft delete Active Text in Rails 6

I added Action Text to my Post to have the content be rich text but when I soft-delete a post the content is deleted. If I restore the post the content is no longer there. This is my Post model class Post < ApplicationRecord acts_as_paranoid …
sara lance
  • 493
  • 4
  • 16
2
votes
1 answer

Action Text displaying image error rails 6 on windows 10

I am using windows 10 to program ruby on rails 6 with the help of ruby installer. Everything works fine so far until... I use action text for rich text editor. I followed this guide [https://edgeguides.rubyonrails.org/action_text_overview.html][1]…
2
votes
2 answers

Trix using rails actiontext add pure html

I would like to use the rich text editor trix in rails6. How can I add a button to trix which adds html content?
Chris
  • 318
  • 1
  • 15
2
votes
0 answers

What is the best way to customize a rich_text_area (aka trix) toolbar in rails?

Let's say I want to add a button that toggles red colored text on and off. I've done the basic action_text setup as described on rubyonrails.org, however, I made the following change to my application.js file in order to add a button called RED to…
obiruby
  • 379
  • 1
  • 6
2
votes
1 answer

Action text with email

How to send mail body in action text? Post.rb has_rich_text :body after_create :send_email_to_current_user def send_email_to_current_user PostEmailer.create_post(current_user, self) end PostEmailer.rb def create_post(user, post) email =…
2
votes
0 answers

Extending Trix using rails actiontext with your favorit css icons set e.g. font-awesome

I am using rails action text --> trix. I would like to extend trix with a button where the user can choose from a preset / selction of icons / smilies which are already included in the website stylesheet e.g. font-awesome. Does anybody has an idea…
Chris
  • 318
  • 1
  • 15
2
votes
2 answers

Rails translate rich text with Mobility and ActionText as backend?

Mobility has a syntax to translate Rails ActiveRecord strings and text: class Word < ApplicationRecord extend Mobility translates :content end On the other hand, here is the syntax to declare rich text with ActionText: class Word <…
2
votes
1 answer

Can't get Rails Action Text in console

When I save a model with action text, the content saves to the database, but it's not accessible through the console. I have a Section model with has_rich_text :content When I try to create a new record, it creates a rich text association, but the…
navi
  • 193
  • 2
  • 12
2
votes
1 answer

How to use rich_text_area with simple_form in Ruby on Rails 6?

At the moment simple_form does not support ruby on rails 6 action_text with the rich_text_area input field. So at the moment my input field can look like this in posts/_form.html.haml: = f.label :description = f.rich_text_area :description =…
2
votes
2 answers

How do I customize the number of rows in my rich_text_area for simple_form?

I am using SimpleForm 5.0.2 along with ActionText. I would like the main body field of my form to be multiple rows (say 10), but I can't figure out how to get it to work. This is my current attempt: <%= f.rich_text_area :body, class: 'form-control',…
marcamillion
  • 32,933
  • 55
  • 189
  • 380