rails_wangeditor 0.1.2 → 0.1.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78a8c3bf30330b9aee4417c1e3ee7b5f52144ac7
|
4
|
+
data.tar.gz: 9fc740643188b8c31e58861c12c347712302dacf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d6f16313c28ec69e8e66407d44c1c9cbda85adc1b8b7f366c64f2cd4555b089d1519dff746c0f0ffcf34cdef43f1627b1243ebcef4aa9529719c0195742904e
|
7
|
+
data.tar.gz: 1943f184750f70c8f339288de431b58564defa74cc51194bff815f55bc4a1e5504800111586eb68d5b7babca84f9543776abff60d1fdeacac340740d29daa487
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ rails_wangeditor will helps your rails app integrate with wangEditor, includes i
|
|
10
10
|
### Add this to your Gemfile
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
gem 'rails_wangeditor'
|
13
|
+
gem 'rails_wangeditor', '>= 0.1.3'
|
14
14
|
```
|
15
15
|
|
16
16
|
### Run "bundle" command.
|
@@ -38,14 +38,14 @@ In Rails 4.0's production mode, please run 'rake wangeditor:assets', this method
|
|
38
38
|
|
39
39
|
```ruby
|
40
40
|
1. <%= wangeditor_tag :content, 'default content value' %>
|
41
|
-
# or <%= wangeditor_tag :content, 'default content value', :input_html =>{style: "
|
41
|
+
# or <%= wangeditor_tag :content, 'default content value', :input_html =>{style: "height: 300px"} %>
|
42
42
|
```
|
43
43
|
|
44
44
|
```ruby
|
45
45
|
2. <%= form_for @article do |f| %>
|
46
46
|
...
|
47
47
|
<%= f.wangeditor :content %>
|
48
|
-
# or <%= f.wangeditor :content, style: "
|
48
|
+
# or <%= f.wangeditor :content, style: "height: 300px"%>
|
49
49
|
...
|
50
50
|
<% end %>
|
51
51
|
```
|
@@ -61,7 +61,7 @@ When you need to specify the owner_id:
|
|
61
61
|
### simple_form:
|
62
62
|
|
63
63
|
```ruby
|
64
|
-
<%= f.
|
64
|
+
<%= f.input :content, as: :wangeditor, :label => "正文", :owner_id => current_user.id, :input_html => {style: "height: 300px" } %>
|
65
65
|
```
|
66
66
|
|
67
67
|
## Upload options configuration
|
@@ -24,7 +24,7 @@ module RailsWangeditor
|
|
24
24
|
insert_into_file "app/assets/stylesheets/application.css", "*= require wangEditor/wangEditor\n", :before => "*= require_self"
|
25
25
|
else
|
26
26
|
if File.exist?('app/assets/stylesheets/application.scss')
|
27
|
-
insert_into_file "app/assets/stylesheets/application.scss", "*= require wangEditor/wangEditor\n", :before => "*= require_self"
|
27
|
+
insert_into_file "app/assets/stylesheets/application.scss", "*= require wangEditor/wangEditor\n", :before => " *= require_self"
|
28
28
|
else
|
29
29
|
copy_file "application.css", "app/assets/stylesheets/application.css"
|
30
30
|
end
|
@@ -51,15 +51,13 @@ module RailsWangeditor
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def js_replace(dom_id, options = {})
|
54
|
-
"
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
editor.create();
|
62
|
-
});
|
54
|
+
"wangEditor.config.mapAk = '#{RailsWangeditor.mapAk}';
|
55
|
+
var editor = new wangEditor('#{dom_id}');
|
56
|
+
wangEditor.config.printLog = false;
|
57
|
+
editor.config.pasteFilter = false;
|
58
|
+
editor.config.uploadImgFileName = 'imgFile'
|
59
|
+
editor.config.uploadImgUrl = '#{wangeditor_upload_json_path(:owner_id => options.delete(:owner_id), :owner_type => options.delete(:owner_type))}'
|
60
|
+
editor.create();
|
63
61
|
"
|
64
62
|
end
|
65
63
|
|
data/rails_wangeditor.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = "rubycat"
|
10
10
|
s.email = "chenxueping1819@gmail.com"
|
11
|
-
s.homepage = "
|
11
|
+
s.homepage = "https://github.com/a598799539/rails_wangeditor"
|
12
12
|
s.summary = "wangEditor for Ruby on Rails"
|
13
13
|
s.description = "rails_wangeditor will helps your rails app integrate with wangEditor, including images uploading."
|
14
14
|
s.license = 'MIT'
|
@@ -21,4 +21,4 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.add_dependency("carrierwave")
|
23
23
|
s.add_dependency("mini_magick")
|
24
|
-
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_wangeditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rubycat
|
@@ -82,7 +82,7 @@ files:
|
|
82
82
|
- vendor/assets/stylesheets/wangEditor/fonts/icomoon.ttf
|
83
83
|
- vendor/assets/stylesheets/wangEditor/fonts/icomoon.woff
|
84
84
|
- vendor/assets/stylesheets/wangEditor/wangEditor.css
|
85
|
-
homepage:
|
85
|
+
homepage: https://github.com/a598799539/rails_wangeditor
|
86
86
|
licenses:
|
87
87
|
- MIT
|
88
88
|
metadata: {}
|