Hi there! I just messaged you on Twitter. I actually have a question for Summernote as well. Whenever I save/publish a post that contains an iframe of a youtube video, it redirects me to the show page but it is blank and I have to update it. Have you tried or noticed that? My customers will want to embed Youtube videos since they are Youtubers and I don't know what to do.
Are you entering the iframe code in the "code view", using the Video button or are you pasting it into the WYSIWYG editor?
Also, can you share the snippet that you're using to display the content of the editor? For example, do you have a <%= raw @model.content %> or something similar?
I have Rails 5 and turbolinks 5. The summernote plugin worked but I had a problem. When I was trying to edit the post, the summernote editor disappear. To fix this I changed one line on coffeescript code:
I followed the video and also added aws s3 storage for my app. I am able to upload to s3 but when the images from summernote are loaded the image path of the loaded files are from my local drive and is not loading from s3. Do you know where and how I can configure summernote to display the image from s3 instead of from my local file?
It could be an issue on the onImageUpload callback in the summernote initialization. Basically, this callback will listen for image uploads and in the example, we're calling a separate javascript function (sendFile). The sendFile function will make an AJAX post to your application at a different endpoint and will handle the uploading to S3. The success callback of this AJAX request should return a hash with the URL of the S3 image. The success callback will create the image element with the URL from the returned hash and that will be what gets inserted.
I've recently switched the Drifting Ruby comments over from Summernote to SimpleMDE which gives better familiarity to code editing WYSIWYG.
Using three backticks, followed by a language, you can create the code blocks
```ruby
def Foo
puts bar
end
```
I have tried to implement summernote, everything works fine. But I tried to send it as an email, the image in the received email was broken, how do I solve this? I'm not sure whether want to add attachment in mailer.rb and does anyone figure it out? Thanks.
Thanks very much for the video!
Thank you for watching
Hi there! I just messaged you on Twitter. I actually have a question for Summernote as well. Whenever I save/publish a post that contains an iframe of a youtube video, it redirects me to the show page but it is blank and I have to update it. Have you tried or noticed that? My customers will want to embed Youtube videos since they are Youtubers and I don't know what to do.
Thank you in advance for your time.
Are you entering the iframe code in the "code view", using the Video button or are you pasting it into the WYSIWYG editor?
Also, can you share the snippet that you're using to display the content of the editor? For example, do you have a <%= raw @model.content %> or something similar?
I have Rails 5 and turbolinks 5. The summernote plugin worked but I had a problem. When I was trying to edit the post, the summernote editor disappear. To fix this I changed one line on coffeescript code:
to
Should you also include this in the notes?
Thanks for the heads up. I've updated the show notes.
Maybe this config can be included too in the article. It allows to persist the uploaded attachments properly.
Without this config, the uploads just stay in system tmp or cache folders and eventually get purged.
Thank you for this video, it was awesome!
I followed the video and also added aws s3 storage for my app. I am able to upload to s3 but when the images from summernote are loaded the image path of the loaded files are from my local drive and is not loading from s3. Do you know where and how I can configure summernote to display the image from s3 instead of from my local file?
It could be an issue on the onImageUpload callback in the summernote initialization. Basically, this callback will listen for image uploads and in the example, we're calling a separate javascript function (sendFile). The sendFile function will make an AJAX post to your application at a different endpoint and will handle the uploading to S3. The success callback of this AJAX request should return a hash with the URL of the S3 image. The success callback will create the image element with the URL from the returned hash and that will be what gets inserted.