This gem basically includes TinyMCE 4 (thanks to gem tinymce-rails) and adds a File Upload functionality to it.
Add this line to your application's Gemfile:
gem 'tinymce_aws_file_upload', git: '[email protected]:PHCruz-Software/tinymce_aws_file_upload.git'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tinymce_aws_file_upload
//= require tinymce-aws-file-upload
Don't forget to set the bucket permissions adding CORS configuration.
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_BUCKET
- AWS_AREA
- HOST (development will be http://localhost:3000/)
If you need help to configure environment variables at development, Heroku has a nice tutorial. To configure them on Heroku, you can see it here
root = exports ? this
root.initTinyMCE('class')
where class is a class you should add to all textareas which you want to add the Tinymce rich text editor.
If the function root.start_loading() and root.stop_loading() exists, those will be called when the file starts uploading and when it ends, respectively.
This gem was originally created by Ariel Schvartz
- Fork it ( http://github.com/arielschvartz/tinymce_aws_file_upload/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request