-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Improve trix and action text support #2715
Comments
Editing an ActionText field with Trix field separates captions from images.
In the trix edit view, the caption is rendered as regular text (a couple |
I think a helpful first step would be to ensure models using I can also confirm that captions are broken as noted by @davekruse. |
Should a separate issue be opened to fix the broken captions? |
Yes, please open a new issue, but first, can you please test if a new app with Trix and AS works well and the captions aren't broken? |
@adrianthedev your new demo app shows the issue:
|
I wrote on the previous PR that that will require us to digg in deeper for such an edge-case. Would you be able to sponsor that fix? |
@adrianthedev could you please clarify what you mean by edge case? Maybe there is a misunderstanding. Using ![]() What I consider to be an edge (a.k.a unofficial) case is to use the Trix editor on top of a plain text DB column without using Currently I am trying to add Avo to a production system but in my free time, because it is just being evaluated; so in turn I am not able to sponsor a fix although I do try to support the project by documenting the issues found with reproduction steps. I hope it's clearer this way. Although I can't sponsor I am happy to support the project in a more modest way and wish you much success. |
Following you last comment I am talking about captions on attachments with What I mean by digging deeper is that we first need to see if they work on a regular Trix and Action Text setup. One thing that we'd love some help with and definitely could help faster is if we had that validation done by you (or someone else). Then, if we find out that it's an Avo bug, we can take action and try to fix it (ourselves, you, or together). The reason why I'm saying it's an edgecase is that it works fine with a I sincerely appreciate you trying out Avo and insisting to add it to your infrastructure! Of course I'm not expecting you personally to sponsor this development. If that's the vibe I gave, I'm sorry. So, let's try to fix this together. |
This has been fixed with #2958 |
Hi everyone, I've been digging deeper into this issue and have done a lot of research in the Rails codebase. It seems Rails handles attachment uploads a bit differently. I’d like to contribute to resolving this issue. Is there any particular reason why we shouldn't stick with Rails' direct upload solution for handling attachments? @adrianthedev , @Paul-Bob |
I've initiated the solution mentioned above in this PR: #3609. |
Hi @PedroAugustoRamalhoDuarte, thanks for looking into this.
One of the reasons that we handle the upload request on a custom controller is authorization. It seems to me that all the issues mentioned in the original description have been resolved. What exactly are you trying to fix? |
I just noticed that for creation we're not applying the authorization so using the solution from the PR shouldn't introduce any regression on creation. Is it possible to keep using the custom controller and redirect to the rails direct upload URL around here |
@Paul-Bob Thanks for the fast response, i am having problem with the third one, i am attaching a pdf, but when i render this pdf the attachment is missing. |
Feature
Trix field have some limitations:
attachment_key
has_rich_text
) After uploading File in ActionText (Trix) it can not be found when rendering (missing attachable) #2538Let's explore this possibility:
attachment_key
is set that means we need a persistent record with thatattachment_key
association. So limitation points 1 and 2 still applying.attachment_key
is not set that means the user do not want to associate the attachments to a fixed key/association. We can generate a random key like here https://trix-editor.org/js/attachments.js and in this case the limitation points 1 and 2 will not apply, i.e there is no need for a record and neitherattachment_key
.The text was updated successfully, but these errors were encountered: