Questions tagged [actiontext]

148 questions
1
vote
1 answer

RoR: How to get active_storage image to trigger a modal?

I am trying to make an actiontext blob trigger a modal but it doesn't work. action_storage/blobs/_blob.rb
attachment--<%= blob.filename.extension %>"> …
1
vote
3 answers

Is it possible to prevent empty action text entries

I have a very simple action text model and form class Course < ApplicationRecord validates :title, presence: true has_rich_text :content end <%= form_with model: @course do |f| %> <%= f.text_field :title %> <%= f.rich_text_area :content…
vince
  • 2,374
  • 4
  • 23
  • 39
1
vote
2 answers

Action Text attachments not working on production

We're currently using Active Storage to upload avatar images to Amazon S3 which is working great on local as well as production class User < ApplicationRecord has_one_attached :avatar end I'm now trying to use Action Text and followed the…
1
vote
1 answer

How to move validation for Action Text attachment from javascript to model

We're currently doing this to validate uploads for action text and it's working ok. Is there a way to move this validation to the server, i.e. in course.rb instead of in javascript? models/course.rb class Course < ApplicationRecord has_rich_text…
vince
  • 2,374
  • 4
  • 23
  • 39
1
vote
2 answers

Rails 6: ActionText breaks my links, how to disable URL encoding?

I use action_text with a model and need to type in links using liquid template variables, for example: Contact us at: support@{{website.domain_name}} However action_text breaks these links by…
Nick M
  • 2,424
  • 5
  • 34
  • 57
1
vote
2 answers

How to avoid overlap of native cut/copy/paste menu with Trix Editor toolbar on mobile devices?

When using the Rails view helper "rich_text_editor:" to render a text input field, a Trix editor toolbar is automatically instantiated above the text field input. However, on mobile devices the Trix toolbar buttons are obscured by the native…
1
vote
1 answer

Images in Actiontext Editor blinks or refreshes when entering into new line

I recently configured Actiontext to work on my Rails 6.0.0 app. Everything works fine except the images in my app's Actiontext editor blinks every time I press enter to a new line. Can refer to the video…
1
vote
1 answer

action_text - enable/disable attachments in different fields

How can I disable action_text attachments for one field, but enable it for another? I have a post model with 2 fields - description_without_attachments and content_with_attachments. Model Post.rb: has_rich_text :description_without_attachments …
Yshmarov
  • 3,450
  • 1
  • 22
  • 41
1
vote
1 answer

How validate my attachments in rich text on Action Text Rails 6?

class Post < ApplicationRecord has_rich_text :content validates :content, presence: true validate :content_length validate :content_embeds def content_embeds if content.embeds.any? errors.add(:content, 'Нельзя…
1
vote
1 answer

How Ransack can search for Rails6 Action Text content

I've upgraded my project to Rails6 (v6.0.1) and now using Action Text in my model. However I cannot find a way to change my Ransack to be able to search text from the content, which I understand that after Action Text migration it is now stored…
ryon1104
  • 11
  • 2
1
vote
1 answer

Rails 6 ActionText rich_text_area works normally, does not appear when rendered in a layout

I'm rendering a form that utilizes the ActionText input rich_text_area, which is the Rails implementation of the Trix WYSIWYG rich text editor. It's been working fine until I started refactoring my views to use a layout, where the form content can…
Dan Engel
  • 75
  • 1
  • 10
1
vote
1 answer

Rails6 how to fill text from db into ActionText

I've been trying for a while now to auto fill a string from my database onto action text, without luck. <%= f.rich_text_area :application, placeholder: 'Hvis du har ansøgt skriftligt, så kan du ligge din ansøgning ind her', …
Kaspervh
  • 23
  • 3
1
vote
1 answer

How to persist custom options on WYSIWYG Trix Editor while editing (Ruby on Rails, Actiontext)

I am creating a Rails website with a WYSIWYG, using Trix and actiontext. I am using Ruby 2.6.3 and Rails 5.2.3. Issue: when I implement custom edition (i.e, adding a text color red) it works perfectly at the creation (CRUD: new), displays perfectly…
1
vote
1 answer

ActionText image not stored in Azure (or any other service)

I have a Rails app with ActionText and ActiveStorage. So I have a ticket form with a description field, where ActionText is used. When I have the development environment configured to save the attachments to the local disk, everything works…
John
  • 6,404
  • 14
  • 54
  • 106
1
vote
1 answer

How do I get nested comments created with ActionText (Trix Editor) to display in a rails project?

My second-level comments, created using ActionText / Trix Editor are not displaying in my rails app. The original post displays fine as do first-level comments. But, comments on comments will not display. I created an app using Rails 6 that has…