Adam Stockland

Joined

90 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in How To Update ActionText Attachments Discussion

https://github.com/hotwired/turbo-rails/issues/340

This issue comes with upgrading turbo-rails gem to 1.1.1. Simply downgrading to 1.1.0 will resolve the broken embeds issue. It seems if you use the process in this video and then later decide to downgrade back to 1.1.0---the embeds will remain broken in any ActionText::RichText objects that were changed by this code.

What might the task look like to go the other way---to convert an ActionText::RichText object back to the way it was before this?

I just changed it up a bit. I assigned the drag-url to the item....not the container. That way I don't need to replace :id with id. And, then to get that url in the end method I use event.item.dataset.dragUrl.

I get the following error when grabbing the url:

TypeError: null is not an object (evaluating 'this.data.get('url').replace'). I set data: {drag_url: 'xx'} on the wrapper div (same div that has data-controller on it). For some reason this.data is always null.

Any ideas why this would be?

Removing buttons does seem to be easily done with css, but what about adding custom buttons like h1, h2, h3, underline, indent, etc? Seems like ActionText (via Trix) would have some config options to more easily customize the toolbar. I know you can customize (or, build your own) toolbar in Trix...but, how would you do this inside of Rails ActionText?

Posted in How to email @mentioned users (from ep #288)?

I followed ep #288 and set up ActionText @mentions. Is there a way to automatically email the users who are mentioned?