Working with Redcarpet (markdown) and AWS S3

106 views
Skip to first unread message

Tan Heng Gek

unread,
Jun 18, 2016, 3:58:28 AM6/18/16
to Ruby on Rails: Talk
I'm using Redcarpet for markdown editor. The form contains a basic textarea. It works fine.

I use CarrierWave to upload most of my files to aws S3 buckets. It works fine too.

But, I'm unable to figure out how to include & upload image (to S3) on the textarea (markdown). 

Kindly advice. Thanks!

Walter Lee Davis

unread,
Jun 18, 2016, 6:49:15 AM6/18/16
to rubyonra...@googlegroups.com
This isn't something that will just work without additional code, likely in JS, to manage the upload and return the complete URL to the image. I've used a number of Markdown toolbars in the past that let you add a link to an already-uploaded image in the stream of your Markdown text with one click. But all that's doing is adding the `![your text](full/url/to/image)` syntax around your selected text. Uploading the image within the context of doing the rest of the text editing is not a regular feature of Redcloth or Markdown itself.

Here, I just googled this for you:

https://blog.fineuploader.com/2013/08/16/fine-uploader-s3-upload-directly-to-amazon-s3-from-your-browser/

Walter

>
> Kindly advice. Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a0edeed3-9b4e-4684-bf12-831cb895b2a6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages