-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to change the RAILS_DIRECT_UPLOADS_URL? #43
Comments
@mech |
Sure, let me try it 😀 |
Hi, I have made a pull request at #44 However, I want to ask you a question. When I drag a file to the Trix editor, it does not seems to react, is there any additional step to perform? |
Yeah. We need to add |
Tks for the info. Just for those looking into it. Here's what I did: import Trix from "trix";
import { ReactTrixRTEInput } from "react-trix-rte";
import "@rails/actiontext"; At the Rails API end, need to do much more effort:
Looking forward to get the pull request merged 😀 |
I saw your Rails contribution on this rails/rails#39113 did not receive anymore attention. I am wondering if I can do this at the config.after_initialize do
ActionText::Attachments::TrixConversion.class_eval do
def to_trix_attachment(content = trix_attachment_content)
attributes = full_attributes.dup
attributes["content"] = content if content
attributes["url"] = Rails.application.routes.url_helpers.rails_blob_url(preview_image.blob, only_path: false) if previewable_attachable? && previewable?
ActionText::TrixAttachment.from_attributes(attributes)
end
end
end Will using |
Fixed in #44 |
Hi,
Great Trix integration with React. Want to ask if there is a way to change the URL for RAILS_DIRECT_UPLOADS_URL since our Rails API server is on another host.
Regards
The text was updated successfully, but these errors were encountered: