rails_wangeditor 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c9d1f3c1cab007cc7ba2d4344d6d202498094b4
4
- data.tar.gz: fd62c3dccc9d113a0481144c98a1b400671dbc35
3
+ metadata.gz: 78a8c3bf30330b9aee4417c1e3ee7b5f52144ac7
4
+ data.tar.gz: 9fc740643188b8c31e58861c12c347712302dacf
5
5
  SHA512:
6
- metadata.gz: 4b5d437564621298e21ba38ae52bf2d1aa8d10e7160dfe13fce018fdefda80bb34f39fa6e1fd29b08c2d04801dce529200a849f5828dfb82c2f5d7e116156f75
7
- data.tar.gz: f15a7c69e214440ee07b38a9aa4cd89513ee6a1b11d279fb4a4a5c73bd183cb3c7bc57e0b1a8e353c9f8e91638e8d6d440916d177c7b63b3e8295dfde7329af2
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: "500px"} %>
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: "500px"%>
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.wangeditor :content, style: "500px"%>
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
- "$(document).ready(function(){
55
- wangEditor.config.mapAk = '#{RailsWangeditor.mapAk}';
56
- var editor = new wangEditor('#{dom_id}');
57
- //wangEditor.config.printLog = false;
58
- editor.config.pasteFilter = false;
59
- editor.config.uploadImgFileName = 'imgFile'
60
- editor.config.uploadImgUrl = '#{wangeditor_upload_json_path(:owner_id => options.delete(:owner_id), :owner_type => options.delete(:owner_type))}'
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
 
@@ -1,4 +1,4 @@
1
1
  module RailsWangeditor
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
4
4
 
@@ -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 = "http://github.com/a598799539"
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.2
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: http://github.com/a598799539
85
+ homepage: https://github.com/a598799539/rails_wangeditor
86
86
  licenses:
87
87
  - MIT
88
88
  metadata: {}