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 below.
https://i.stack.imgur.com/OasG3.jpg
I'm unsure how to troubleshoot this problem. Could it be a misconfigured Actiontext or ActiveStorage?
Edited:
Here is my code,
// javascript/packs/application.js
require("trix")
require("@rails/actiontext")
/* assets/stylesheets/application.scss */
//=require actiontext
/* assets/stylesheets/actiontext.scss */
@import "trix/dist/trix";
.trix-content {
.attachment-gallery {
> action-text-attachment,
> .attachment {
flex: 1 0 33%;
padding: 0 0.5em;
max-width: 33%;
}
&.attachment-gallery--2,
&.attachment-gallery--4 {
> action-text-attachment,
> .attachment {
flex-basis: 50%;
max-width: 50%;
}
}
}
action-text-attachment {
.attachment {
padding: 0 !important;
max-width: 100% !important;
}
}
}
# app/models/card.rb
class Card < ApplicationRecord
has_rich_text :answer
end
<%# app/views/cards/_form.html.erb %>
<div class="form-group">
<%= f.label :answer %>
<%= f.rich_text_area :answer %>
</div>