tinymce_aws_file_upload 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -8
- data/lib/tinymce_aws_file_upload/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 624dc53bb7d8fa0998aee0c9a82317dcf7d0e5fd
|
4
|
+
data.tar.gz: be0f5938cefab1974566b50763eb519b1b2f8324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52f0997445aceb85a6b9f64a7e84b4960d27a971ce0049ad73f0b9e66558b25ffe247a350a1e88f584cbb49e1c349ee834eb8e10f644df3857498a0b1289c243
|
7
|
+
data.tar.gz: 5007a9de680b393a58a3ec1a45bc651bc8cf1b3a95ae1d8fb057e2a6e3e25e087bbe0517cd1059cc56d3c25cd5d456cc60fc4dc3164ffa67e9c40e166e3eb36d
|
data/README.md
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
-
#
|
1
|
+
# TinyMCE AWS File Upload
|
2
2
|
|
3
|
-
This gem basically includes TinyMCE 4 (thanks to gem
|
3
|
+
This gem basically includes TinyMCE 4 (thanks to gem [tinymce-rails](https://github.com/spohlenz/tinymce-rails/tree/tinymce-4)) and adds a File Upload functionality to it.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
|
-
|
9
|
+
```ruby
|
10
|
+
gem 'tinymce_aws_file_upload', '~> 0.1.0'
|
11
|
+
```
|
10
12
|
|
11
13
|
And then execute:
|
12
14
|
|
@@ -19,9 +21,14 @@ Or install it yourself as:
|
|
19
21
|
## Usage
|
20
22
|
|
21
23
|
### On your application.js add the line:
|
22
|
-
//= require tinymce-aws-file-upload
|
23
24
|
|
24
|
-
|
25
|
+
```javascript
|
26
|
+
//= require tinymce-aws-file-upload
|
27
|
+
```
|
28
|
+
|
29
|
+
### You need to configure your AWS bucket but setting these environment variables:
|
30
|
+
|
31
|
+
> Don't forget to set the bucket permissions [adding CORS configuration.](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors)
|
25
32
|
|
26
33
|
1. AWS_ACCESS_KEY_ID
|
27
34
|
2. AWS_SECRET_ACCESS_KEY
|
@@ -29,12 +36,15 @@ Or install it yourself as:
|
|
29
36
|
4. AWS_AREA
|
30
37
|
5. HOST (development will be http://localhost:3000/)
|
31
38
|
|
32
|
-
|
39
|
+
> If you need help to configure environment variables at development, Heroku has a nice [tutorial](https://devcenter.heroku.com/articles/getting-started-with-rails4).
|
40
|
+
> To configure them on Heroku, you can see it [here](https://devcenter.heroku.com/articles/config-vars)
|
33
41
|
|
34
42
|
### In your coffeescript files add
|
35
43
|
|
36
|
-
|
37
|
-
|
44
|
+
```coffeescript
|
45
|
+
root = exports ? this
|
46
|
+
root.initTinyMCE('class')
|
47
|
+
```
|
38
48
|
where class is a class you should add to all textareas which you want to add the Tinymce rich text editor.
|
39
49
|
|
40
50
|
## Contributing
|