kindeditor 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +23 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/kindeditor-0.0.2.gem +0 -0
- data/kindeditor.gemspec +5 -3
- data/lib/kindeditor.rb +8 -3
- data/pkg/kindeditor-0.0.2.gem +0 -0
- metadata +6 -4
data/README.md
CHANGED
@@ -2,26 +2,34 @@ Rails KindEditor integration plugin with paperclip support for rails3 Rc,it supp
|
|
2
2
|
--------------
|
3
3
|
[Kindeditor](http://www.kindsoft.net "Kindeditor") is a open source HTML visual editor ,it can work good in IE, Firefox, Chrome, Safari.and it has become one of the most popular editor in China.
|
4
4
|
|
5
|
-
KindEditor version: 3.5.1 [Kindeditor](http://kindeditor.googlecode.com/files/kindeditor-3.5.1-zh_CN.zip "Kindeditor")
|
5
|
+
KindEditor version: 3.5.1 zh-cn [Kindeditor](http://kindeditor.googlecode.com/files/kindeditor-3.5.1-zh_CN.zip "Kindeditor")
|
6
6
|
|
7
7
|
|
8
8
|
Require:
|
9
9
|
---------------
|
10
10
|
- Rails3
|
11
11
|
- Paperclip(if you use mongoid,make sure your paperclip can work in mongoid,you can edit paperclip.rb in config/initializers)
|
12
|
+
|
12
13
|
Paperclip.options[:log] = false
|
13
14
|
|
14
15
|
Install
|
15
16
|
---------------
|
16
17
|
- As a plugin
|
17
|
-
|
18
|
+
|
19
|
+
rails plugin install git://github.com/doabit/kindeditor.git
|
20
|
+
|
21
|
+
- As a gem
|
22
|
+
|
23
|
+
sudo gem install kindeditor
|
18
24
|
|
19
25
|
- copy files .
|
26
|
+
|
20
27
|
rails g kindeditor:install
|
21
28
|
|
22
29
|
Usage
|
23
30
|
--------------
|
24
31
|
- kindeditor helper to layout that you want to use it
|
32
|
+
|
25
33
|
<%=kindeditor_javacript_include_tag%>
|
26
34
|
|
27
35
|
- add a id "kindeditor" to your textarea
|
@@ -36,6 +44,16 @@ The install generator will copy kindeditor_controller.rb to app/controllers , ki
|
|
36
44
|
|
37
45
|
If you want to mondify the Kindeditor items,you can open public/javascripts/kindeditor/kindeditor_config.js,and modify it for yourself.
|
38
46
|
|
47
|
+
update:
|
48
|
+
|
49
|
+
if you want to use for diffrent layout and you want to custom yourself,you can add args for kindeditor_javacript_include_tag
|
50
|
+
and you can add cache option to it.defaut :cache=>false
|
51
|
+
eg:
|
52
|
+
|
53
|
+
<%=kindeditor_javacript_include_tag("kindeditor/my_config","cosutom",:cache=>true)%>
|
54
|
+
|
55
|
+
then it will use your config and will not use defauot config in kindeditor folder.
|
56
|
+
|
39
57
|
TODOs
|
40
58
|
--------------
|
41
59
|
Add images paginate
|
@@ -45,7 +63,9 @@ Support CarrierWave
|
|
45
63
|
Example Use:
|
46
64
|
---------------
|
47
65
|
1. Create CRUD for post
|
66
|
+
|
48
67
|
rails generate scaffold post title:string body:text
|
68
|
+
|
49
69
|
Run Migrations
|
50
70
|
|
51
71
|
2. rake db:migrate
|
@@ -55,6 +75,7 @@ Example Use:
|
|
55
75
|
<%=kindeditor_javacript_include_tag%>
|
56
76
|
|
57
77
|
4. Modify views/posts/_form.html.erb
|
78
|
+
|
58
79
|
<%= f.text_area :body,:id => "kindeditor" %>
|
59
80
|
|
60
81
|
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ begin
|
|
8
8
|
gem.summary = %Q{Rails KindEditor plugin}
|
9
9
|
gem.description = %Q{Rails KindEditor integration plugin with paperclip support for rails3 Rc,it supports active_record and mongoid!}
|
10
10
|
gem.email = "doinsist@gmail.com"
|
11
|
-
gem.homepage = "http://github.com/doabit/
|
11
|
+
gem.homepage = "http://github.com/doabit/kindeditor"
|
12
12
|
gem.authors = ["doabit"]
|
13
13
|
gem.add_development_dependency "paperclip", ">= 2.3.3"
|
14
14
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
Binary file
|
data/kindeditor.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{kindeditor}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["doabit"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-16}
|
13
13
|
s.description = %q{Rails KindEditor integration plugin with paperclip support for rails3 Rc,it supports active_record and mongoid!}
|
14
14
|
s.email = %q{doinsist@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
"VERSION",
|
23
23
|
"init.rb",
|
24
24
|
"install.rb",
|
25
|
+
"kindeditor-0.0.2.gem",
|
25
26
|
"kindeditor.gemspec",
|
26
27
|
"lib/generators/USAGE",
|
27
28
|
"lib/generators/kindeditor/install_generator.rb",
|
@@ -200,6 +201,7 @@ Gem::Specification.new do |s|
|
|
200
201
|
"lib/generators/kindeditor/templates/mongoid/kindeditor_image.rb",
|
201
202
|
"lib/kindeditor.rb",
|
202
203
|
"pkg/kindeditor-0.0.1.gem",
|
204
|
+
"pkg/kindeditor-0.0.2.gem",
|
203
205
|
"pkg/kinkdeditor-0.0.1.gem",
|
204
206
|
"spec/generators/install_generaor_spec.rb",
|
205
207
|
"spec/kindeditor_spec.rb",
|
@@ -207,7 +209,7 @@ Gem::Specification.new do |s|
|
|
207
209
|
"spec/spec_helper.rb",
|
208
210
|
"uninstall.rb"
|
209
211
|
]
|
210
|
-
s.homepage = %q{http://github.com/doabit/
|
212
|
+
s.homepage = %q{http://github.com/doabit/kindeditor}
|
211
213
|
s.rdoc_options = ["--charset=UTF-8"]
|
212
214
|
s.require_paths = ["lib"]
|
213
215
|
s.rubygems_version = %q{1.3.7}
|
data/lib/kindeditor.rb
CHANGED
@@ -2,8 +2,13 @@
|
|
2
2
|
module Kindeditor
|
3
3
|
include ActionView
|
4
4
|
module ActionView::Helpers::AssetTagHelper
|
5
|
-
def kindeditor_javacript_include_tag
|
6
|
-
|
5
|
+
def kindeditor_javacript_include_tag(*args)
|
6
|
+
options=args.extract_options!
|
7
|
+
if args.empty?
|
8
|
+
javascript_include_tag("kindeditor/kindeditor-min","kindeditor/kindeditor_config",options)
|
9
|
+
else
|
10
|
+
javascript_include_tag(args.insert(0,"kindeditor/kindeditor-min"),options)
|
11
|
+
end
|
7
12
|
end
|
8
13
|
end
|
9
|
-
end
|
14
|
+
end
|
Binary file
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- doabit
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-09-16 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- VERSION
|
48
48
|
- init.rb
|
49
49
|
- install.rb
|
50
|
+
- kindeditor-0.0.2.gem
|
50
51
|
- kindeditor.gemspec
|
51
52
|
- lib/generators/USAGE
|
52
53
|
- lib/generators/kindeditor/install_generator.rb
|
@@ -225,6 +226,7 @@ files:
|
|
225
226
|
- lib/generators/kindeditor/templates/mongoid/kindeditor_image.rb
|
226
227
|
- lib/kindeditor.rb
|
227
228
|
- pkg/kindeditor-0.0.1.gem
|
229
|
+
- pkg/kindeditor-0.0.2.gem
|
228
230
|
- pkg/kinkdeditor-0.0.1.gem
|
229
231
|
- spec/generators/install_generaor_spec.rb
|
230
232
|
- spec/kindeditor_spec.rb
|
@@ -232,7 +234,7 @@ files:
|
|
232
234
|
- spec/spec_helper.rb
|
233
235
|
- uninstall.rb
|
234
236
|
has_rdoc: true
|
235
|
-
homepage: http://github.com/doabit/
|
237
|
+
homepage: http://github.com/doabit/kindeditor
|
236
238
|
licenses: []
|
237
239
|
|
238
240
|
post_install_message:
|