Questions tagged [actiontext]

148 questions
0
votes
1 answer

rails 7 ActionText: how to display images html from S3 in production?

Since a few days, I start to pull out my hair with a problem of displaying images stored on AWS S3. The images are sent to the S3 during creation, but it is not possible to display them in the HTML. I think I missed something in the…
0
votes
2 answers

Rails ActionText attachments lost after docker rebuild and docker-compose up

I've setup ActiveStorage and ActionText by following the official guides. I can attach images and videos in local environment(localhost:3000). All the things are working well, even after I restart the server. So I deploy my code change to staging.…
hiveer
  • 660
  • 7
  • 17
0
votes
1 answer

Image uploading not working when dragging and dropping into rich_text_area

I have a strange issue in my Rails app. There is a form.richt_text_area and when I drag & drop an image, nothing happens. Also in the log nothing new happens. When I create a new test application and add a form.richt_text_area, when dragging and…
John
  • 6,404
  • 14
  • 54
  • 106
0
votes
1 answer

Extent ActionText::RichText to override table_name

ActionText::RichText class has table name hard coded in Rails code. self.table_name = "action_text_rich_texts" It ignores table_name_prefix setting and makes it not possible to have a table name project_a_action_text_rich_texts work. Is there a way…
Sharjeel
  • 15,588
  • 14
  • 58
  • 89
0
votes
1 answer

Is there a way to get all records where action_text is nill

my model looks like class User < ApplicationRecord has_rich_text :profile_text end Now I am trying to find all the records that have an empty profile_text
MZaragoza
  • 10,108
  • 9
  • 71
  • 116
0
votes
1 answer

Copy an ActionText field to a plain text field Rails

I need to search text in a Rails ActionText field. Couldn't find any solutions, so I created a text plain field and when the ActionText form is submitted, a before_ save self.content_plain_text = content.body.to_plain_text is run. This works fine…
Greg
  • 2,359
  • 5
  • 22
  • 35
0
votes
1 answer

query attachments specifically from actiontext

I want to be able to add an attachment icon to actiontext bubbles that have an attachment. - if m.body %div{class: 'far fa-paperclip' Kind of thing... Even better if its also something i could use in an query…
bryanfeller
  • 336
  • 4
  • 8
0
votes
1 answer

action text wont install on Rails 6.1.3.2 app

I have a new Rails 6.1.3.2 app with ActiveStorage configured that I'm attempting to install Action Text on. Every tutorial says to just run rails action_text:install and it will create the migration files but my install just hangs with no output or…
random_user_0891
  • 1,863
  • 3
  • 15
  • 39
0
votes
1 answer

Put a relative link button in Rails Action Text

In .html.erb <%= link_to 'the listing', "years/1846", class: "btn btn-primary" %> works. How can I put this in an Action Text field and have it be a link? It will be hard coded to a specific record as shown. years is a table, model, etc in my app.…
Greg
  • 2,359
  • 5
  • 22
  • 35
0
votes
0 answers

Rails Actiontext/Trix; Can I insert HTML element or attachment just after current text cursor position?

I am currently inserting HTML elements into the Rails ActionText/Trix editor, function insertAttachment (data, trix) { const editor = document.getElementById("post_content").editor; const length = editor.getDocument().toString().length; …
yumado
  • 1
  • 1
0
votes
1 answer

Observe Rails ActionText for changes

What is the simplest way to observe Rails ActionText for changes? My use case is to send a notification when a rich text field has been edited. Because ActionText creates an association to a model and is not an attribute on the model the Dirty…
haroldus
  • 111
  • 1
  • 3
0
votes
1 answer

JSON (AJAX) update of ActionText fails on Rails 6.1 RC1

I have a basic web app with a form using ActionText. When changes are made, a have a Trix listener that calls my controller via AJAX (autosave!). The controller looks like this: def update respond_to do |format| if…
Olly
  • 7,732
  • 10
  • 54
  • 63
0
votes
0 answers

Image upload in ActionText not linking to S3 after export / import Database

I'm using ActionText for my blog, last week I backed up my database to import to new server. But after I imported my backup SQL, all images uploaded by ActionText are not linking correctly to S3. Other all image and new image working correctly, but…
0
votes
1 answer

Rails: How to show Web Previews when a link is added into trix

I came across Onebox https://github.com/discourse/onebox - A gem for turning URLs into website previews. How can I use/build similar functionality for Trix Editor based rich_text_area?
vanquishers
  • 358
  • 1
  • 3
  • 18
0
votes
0 answers

SQLite3::ConstraintException: UNIQUE constraint failed: action_text_rich_texts.record_type, action_text_rich_texts.record_id

I cannot create new product,and get this error although product.valid? = true: ActiveRecord::RecordNotUnique in Admin::ProductsController#create SQLite3::ConstraintException: UNIQUE constraint failed: action_text_rich_texts.record_type,…
akasuki101
  • 51
  • 1
  • 4
1 2 3
9
10